{"record":{"id":"302ef36e6bc08113","repo":"zed-industries/zed","slug":"zed-build-remote-server-is-not-set-and-no-remote-s","errorCode":null,"errorMessage":"ZED_BUILD_REMOTE_SERVER is not set and no remote server exists at ({:?})","messagePattern":"ZED_BUILD_REMOTE_SERVER is not set and no remote server exists at \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote/src/transport/docker.rs","lineNumber":280,"sourceCode":"                &tmp_path,\n                &remote_dir_for_server,\n                delegate,\n                cx,\n            )\n            .await?;\n            self.extract_server_binary(&dst_path, &tmp_path, &remote_dir_for_server, delegate, cx)\n                .await?;\n            return Ok(dst_path.into());\n        }\n\n        if binary_exists_on_server {\n            return Ok(dst_path.into());\n        }\n\n        let wanted_version = cx.update(|cx| match release_channel {\n            ReleaseChannel::Nightly => Ok(None),\n            ReleaseChannel::Dev => {\n                anyhow::bail!(\n                    \"ZED_BUILD_REMOTE_SERVER is not set and no remote server exists at ({:?})\",\n                    dst_path\n                )\n            }\n            _ => Ok(Some(AppVersion::global(cx))),\n        })?;\n\n        let tmp_path_gz = paths::remote_server_dir_relative().join(\n            RelPath::from_unix_str(&format!(\n                \"{}-download-{}.gz\",\n                binary_name,\n                std::process::id()\n            ))\n            .unwrap(),\n        );\n        if !self.connection_options.upload_binary_over_docker_exec\n            && let Some(url) = delegate\n                .get_download_url(remote_platform, release_channel, wanted_version.clone(), cx)","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/zed-industries/zed/blob/5a9b9558db01a6b906cec2fb70a797affdc58cdd/crates/remote/src/transport/docker.rs#L262-L298","documentation":"Thrown by the Docker remote transport when Zed runs in the dev release channel, the container does not already contain a zed-remote-server binary at the expected path, and ZED_BUILD_REMOTE_SERVER is not set. Dev builds have no downloadable prebuilt server (nightly skips version checks, stable/preview resolve an AppVersion to download), so a locally built server must be supplied via that environment variable.","triggerScenarios":"Connecting the Docker transport from a locally compiled (ReleaseChannel::Dev) Zed: the binary_exists_on_server check fails and the release-channel match hits the Dev arm with ZED_BUILD_REMOTE_SERVER absent from the Zed process environment.","commonSituations":"Zed contributors testing remote development against a container; ZED_BUILD_REMOTE_SERVER exported in a different shell than the one that launched Zed; Zed started from a GUI launcher/dock that does not inherit the terminal environment; CI runs using dev builds.","solutions":["Build the remote server in the Zed repo (script/remote-build) and export ZED_BUILD_REMOTE_SERVER to the produced target/remote/release/zed-remote-server-<target>.gz, then relaunch Zed from that shell","Pre-place the server binary in the container at the dst_path shown in the error so binary_exists_on_server passes and no env var is needed","Run a release, preview, or nightly build of Zed instead of the dev build so the prebuilt server is downloaded","Verify the variable reaches the process: launch Zed from the same terminal after exporting, or check with `ps eww <pid>`"],"exampleFix":"# before\n./target/debug/zed   # dev channel, ZED_BUILD_REMOTE_SERVER unset\n\n# after\nscript/remote-build\nexport ZED_BUILD_REMOTE_SERVER=\"$PWD/target/remote/release/zed-remote-server-linux-x86_64.gz\"\n./target/debug/zed","handlingStrategy":"validation","validationCode":"fn dev_server_provisionable(release_channel: ReleaseChannel) -> bool {\n    match release_channel {\n        ReleaseChannel::Dev => std::env::var(\"ZED_BUILD_REMOTE_SERVER\").is_ok(),\n        _ => true,\n    }\n}","typeGuard":null,"tryCatchPattern":"match connection.launch_server(cx).await {\n    Err(e) if e.to_string().contains(\"ZED_BUILD_REMOTE_SERVER\") => {\n        // dev channel: instruct user to build + set env var, then retry once\n    }\n    result => result,\n}","preventionTips":["Always export ZED_BUILD_REMOTE_SERVER before launching a dev build of Zed","Launch Zed from the same shell where the remote server was built","Wrap dev-channel remote tests in a script that asserts the env var is set before starting"],"tags":["remote-development","dev-build","missing-env-var","docker"],"backgroundTag":"missing-env-var","analyzedSha":"5a9b9558db01a6b906cec2fb70a797affdc58cdd","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}