{"record":{"id":"9da712b3ec448e8c","repo":"zed-industries/zed","slug":"zed-build-remote-server-is-not-set-and-no-remote-s-9da712","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/ssh.rs","lineNumber":897,"sourceCode":"                    remote_server_path.file_name().unwrap().to_string_lossy()\n                ))\n                .unwrap(),\n            );\n            self.upload_local_server_binary(&remote_server_path, &tmp_path, delegate, cx)\n                .await?;\n            self.extract_server_binary(&dst_path, &tmp_path, 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_compressed = remote_server_dir_relative().join(\n            RelPath::from_unix_str(&format!(\n                \"{}-download-{}.{}\",\n                binary_name,\n                std::process::id(),\n                if self.ssh_platform.os.is_windows() {\n                    \"zip\"\n                } else {\n                    \"gz\"\n                }\n            ))","sourceCodeStart":879,"sourceCodeEnd":915,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/remote/src/transport/ssh.rs#L879-L915","documentation":"SSH-transport equivalent of the dev-channel provisioning guard: when ReleaseChannel::Dev, no server binary already exists on the remote host, and ZED_BUILD_REMOTE_SERVER is unset, Zed cannot obtain a remote server (dev builds are not published for download) and bails, embedding the expected destination path.","triggerScenarios":"Connecting over SSH from a locally compiled Zed: binary_exists_on_server is false and the release-channel match enters the Dev arm with ZED_BUILD_REMOTE_SERVER missing from the environment.","commonSituations":"Contributors testing SSH remote dev with a dev build; env var exported in a shell other than the one launching Zed; launching Zed from a desktop launcher that drops terminal environment; fresh checkouts that never ran the remote build script.","solutions":["Build the server (script/remote-build in the Zed repo) and export ZED_BUILD_REMOTE_SERVER to the built .gz artifact, then relaunch Zed in that shell","Upload the server binary manually to the dst_path named in the error so the existing-binary check passes","Use a stable/preview/nightly Zed build, which downloads a versioned prebuilt server instead","Confirm the variable actually reaches the Zed process environment before connecting"],"exampleFix":"# before\n./target/debug/zed  # dev channel, no env var set\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 ssh_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 ssh_connection.launch_server(cx).await {\n    Err(e) if e.to_string().contains(\"ZED_BUILD_REMOTE_SERVER\") => {\n        // dev build: build the server, set the env var, relaunch, then retry\n    }\n    result => result,\n}","preventionTips":["Run script/remote-build and export ZED_BUILD_REMOTE_SERVER in the launching shell","Start dev builds of Zed from a terminal, not a desktop launcher","Assert the env var in dev/test scripts before opening SSH remotes"],"tags":["remote-development","ssh","dev-build","missing-env-var"],"backgroundTag":"missing-env-var","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}