You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: how to use agent of remote Linux server. #5899
Currently, I am using a local Windows computer, and I also have a remote Linux server. How can I configure and use agents running on the remote server? Is it only possible to use agents on my local computer, or can I run and manage agents on the remote Linux server as well?
Yes — you can run the agents on the remote Linux server and drive them from your Windows client. The mechanism is Orca's headless runtime (orca serve) + the "Remote Orca Servers" pairing: the agents, terminals, and workspaces all live on the server, and the desktop client is just the front-end. Two open issues track this exact use case as P1 — #4501 (closest; also covers holding multiple remotes from the desktop) and #4280 — and it's actively progressing (serve-mode terminal persistence across reconnects already shipped in #4637 / PR #4656).
Runs headless in the foreground and prints a pairing link (orca://pair?code=…). --pairing-address is the key bit for a remote box — set it to an address the client can reach (Tailscale IP, SSH-forwarded localhost, LAN IP, or public tunnel; the flag's own help lists those), and make sure that port is open. The examples use 6768; set it with --port. Register your project so it shows up as a workspace:
orca repo add --path /path/to/your/project
⚠️ Caveat for a truly headless server: orca serve still inherits Electron's display dependency, so on a box with no X server you currently need a virtual display — xvfb-run orca serve …. A display-free, first-class headless mode is exactly what #4280 / #4501 are asking for and isn't fully there yet.
Then open that environment in the desktop app — workspaces, terminals, and agents all run on the remote Linux host; launching an agent spawns it server-side.
No-install option:orca serve also prints a browser URL with the pairing data embedded — open that in any browser and the web client pairs with nothing to install.
A couple of requirements worth calling out
Agent runtimes live on the server. Because agents spawn server-side, the agent CLI you want (e.g. claude) needs to be installed and on PATH on the Linux server, with its own auth/API key configured there — not on the Windows client.
Client and server settings are independent — in my experience Orca doesn't sync settings between them, so each side keeps its own. Your local terminal/shell preferences won't apply to the server runtime; configure runtime-side behavior on the server.
Reachability is the usual gotcha — see the --pairing-address note above; if the client can't reach the address in the pairing link, pairing silently won't connect.
I've been running this setup (desktop client ↔ headless orca serve on a Linux box, under Xvfb) and the agents run and are managed entirely on the server.
Thanks @hufeide — your detectAgents / PATH diagnosis is pointing at the right area, but one part is already handled: the relay isn't running bare which on a non-login shell. main already does /bin/sh -lc 'command -v "$1"' plus a PATH fallback in the relay preflight handler, so the -lc / command -v change you proposed is effectively already shipped.
Verifying against main, the actual gap is two narrower defects:
The relay's PATH fallback omits user-home bins — it covers /usr/local/bin, /opt/homebrew/bin, /usr/bin, /bin but not ~/.local/bin, ~/.cargo/bin, ~/.bun/bin, ~/.opencode/bin. So an agent installed under $HOME comes back empty.
That empty result gets cached and pinned — an empty [] is treated as truthy and never re-detected, so even after you fix PATH it stays "not found" until a full disconnect/reconnect.
#6029 addresses both (widen the relay PATH fallback to the user-home bins; stop pinning empty detection results). Credit to you for surfacing the remote-detection case clearly.
Short answer: yes — you can run agents on the remote Linux server and drive them from your Windows desktop, and the "agents not detected on the remote" problem you hit is a bug that's already fixed in a newer build.
How the setup works
The agents, terminals, and workspaces all live on the Linux server; the Windows desktop is just the front-end. The mechanism is the headless runtime (orca serve) plus a "Remote Orca Servers" pairing.
It runs in the foreground and prints a pairing link (orca://pair?code=…). --pairing-address is the important part for a remote box — set it to an address the client can reach (LAN IP, Tailscale IP, SSH-forwarded localhost, or a public tunnel), and make sure the port is open (--port, the examples use 6768). Register your project so it shows up as a workspace:
orca repo add --path /path/to/your/project
On your Windows desktop, either:
GUI: Settings → Remote Orca Servers → add a server and paste the printed orca://pair?code=… link, then open that environment; or
Workspaces, terminals, and agents then run on the remote Linux host — launching an agent spawns it server-side. There's also a no-install option: orca serve prints a browser URL with the pairing data embedded, so you can pair from any browser with nothing to install.
The one requirement that bites people
Agent runtimes live on the server. Because agents spawn server-side, the agent CLI you want (e.g. claude, codex, opencode) must be installed and on PATHon the Linux server, with its own auth/API key configured there — not on the Windows client.
Your "remote agents not detected" screenshot
That was a real bug: detection couldn't see agents installed under your home directory (e.g. ~/.local/bin, ~/.cargo/bin, ~/.bun/bin, ~/.opencode/bin), and once it returned "none found" it cached that empty result until you reconnected. Both parts are fixed in #6029, which shipped in v1.4.92. You reported this on 1.4.90-rc.0, which is just before the fix landed — so upgrading to v1.4.92 or newer should make remote agents show up (current builds are 1.4.105-rc.x), as long as the agent CLI is installed on the server per the note above.
A first-class, display-free headless server mode (so you don't need a virtual display on a truly headless box) is still being tracked separately in #4280 / #4501 — but the remote-agent workflow itself works today.
Closing as answered — running agents on a remote Linux server works today (see thread).
Disagree? Please respond! I will re-visit this ticket in 5 days. If you respond, I will re-open it 🙏.
Activity
Jelloeater commentedon Jun 20, 2026
I also would like this! I know agent-deck and https://github.com/NeuralNomadsAI/CodeNomad both work headless and remote.
Jelloeater commentedon Jun 20, 2026
Also #4501 and #4280
LesleyMurfin commentedon Jun 21, 2026
Yes — you can run the agents on the remote Linux server and drive them from your Windows client. The mechanism is Orca's headless runtime (
orca serve) + the "Remote Orca Servers" pairing: the agents, terminals, and workspaces all live on the server, and the desktop client is just the front-end. Two open issues track this exact use case as P1 — #4501 (closest; also covers holding multiple remotes from the desktop) and #4280 — and it's actively progressing (serve-mode terminal persistence across reconnects already shipped in #4637 / PR #4656).What works today
On the Linux server:
Runs headless in the foreground and prints a pairing link (
orca://pair?code=…).--pairing-addressis the key bit for a remote box — set it to an address the client can reach (Tailscale IP, SSH-forwarded localhost, LAN IP, or public tunnel; the flag's own help lists those), and make sure that port is open. The examples use6768; set it with--port. Register your project so it shows up as a workspace:orca servestill inherits Electron's display dependency, so on a box with no X server you currently need a virtual display —xvfb-run orca serve …. A display-free, first-class headless mode is exactly what #4280 / #4501 are asking for and isn't fully there yet.On your local Windows client:
Then open that environment in the desktop app — workspaces, terminals, and agents all run on the remote Linux host; launching an agent spawns it server-side.
No-install option:
orca servealso prints a browser URL with the pairing data embedded — open that in any browser and the web client pairs with nothing to install.A couple of requirements worth calling out
claude) needs to be installed and onPATHon the Linux server, with its own auth/API key configured there — not on the Windows client.--pairing-addressnote above; if the client can't reach the address in the pairing link, pairing silently won't connect.I've been running this setup (desktop client ↔ headless
orca serveon a Linux box, under Xvfb) and the agents run and are managed entirely on the server.hufeide commentedon Jun 21, 2026
无头服务器如何安装orca,目前只看到桌面版的linux安装包
hufeide commentedon Jun 21, 2026
export DISPLAY=:99
export LIBGL_ALWAYS_SOFTWARE=1
export ELECTRON_DISABLE_GPU=1
orca-ide serve --pairing-address 192.168.1.210
hufeide commentedon Jun 21, 2026
Orca IDE 1.4.90-rc.0 内部的 gh:workItemDetails 功能有问题。
hufeide commentedon Jun 21, 2026
其他bug
无法识别出远端的服务器的agent,框中的是本地的agent
hufeide commentedon Jun 21, 2026
问题可能是 在wsl中安装了opencode,但是没有加入powershell:
需要 类似 以下命令添加:
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
if ($userPath -notlike "C:\Users\EDY.opencode\bin") {
[Environment]::SetEnvironmentVariable(
"Path",
"$userPath;C:\Users\EDY.opencode\bin",
"User"
)
}
hufeide commentedon Jun 21, 2026
目前本地的agent可以通过这种方式解决,但是远程的agent无法加载。
hufeide commentedon Jun 21, 2026
远程更稳的写法是走 login shell,并补充常见路径:
const commonPaths = [
'$HOME/.local/bin',
'$HOME/.cargo/bin',
'$HOME/go/bin',
'$HOME/.bun/bin',
'/opt/homebrew/bin',
'/usr/local/bin',
'/usr/bin',
'/bin',
].join(':')
const script =
PATH="${commonPaths}:$PATH" command -v ${shellQuote(command)}然后检测返回值是否是绝对路径。
比起 which,command -v 更通用,但注意它也可能返回 alias/function,所以你们已有的 path.isAbsolute() 思路仍然应该保留。
hufeide commentedon Jun 21, 2026
你这里的状态设计会缓存远程结果:
remoteDetectedAgentIds[connectionId]
所以如果第一次远程检测时 PATH 不完整,缓存了空结果,后面即使用户修好了环境,也可能仍然显示检测不到,除非:
SSH 断开,触发清理缓存;
重新连接;
或增加一个 refreshRemoteAgents(connectionId);
或在安装 agent 后主动 invalidate 该 connection 的检测缓存。
建议加一个远程刷新 API,类似本地的:
window.api.preflight.refreshRemoteAgents({ connectionId })
hufeide commentedon Jun 21, 2026
chatgpt说这么改:可以这样改:renderer 侧加“可刷新/不过度缓存空结果”,main 侧加 refresh IPC,真正的 PATH 修复放到 SSH relay 的
preflight.detectAgents实现里。你贴的useComposerState.ts本身不是根因。1.
useComposerState.ts:加 connectionId 保护,避免空连接误检测你现在这段基本可以保留,只建议加一个 remote guard:
这层只是触发检测,不建议在这里塞 PATH 逻辑。
2.
detected-agents.ts:不要把远程空结果永久缓存你现在的问题之一是:
[]在 JS 里也是 truthy,所以一旦远程第一次检测结果是空数组,就会一直返回空数组,直到 SSH 断开清缓存。建议改成支持
force,并且给远程缓存加 TTL。比如:store state 增加一个时间戳字段:
然后把
ensureRemoteDetectedAgents改成:然后
clearRemoteDetectedAgents也要同时清时间戳:这个改动能解决:第一次远程检测为空后,后面一直不重新检测。
3.
src/main/ipc/preflight.ts:加远程 refresh IPC你现在只有:
建议保留它,再加一个 refresh handler:
然后 preload / IPC 类型里也要暴露:
renderer 里可以做一个手动刷新入口,或者在安装 agent 后调用:
4. 真正关键:改 SSH relay 的
preflight.detectAgentssrc/main/ipc/preflight.ts只是把请求转发到 relay。如果 relay 里面仍然只是裸跑which,main/renderer 怎么改都不会稳定。relay 端建议不要只跑:
而是改成:
并且通过用户 shell 执行:
推荐实现形态:
然后 relay 的
preflight.detectAgents用这个函数:normalizeAgentCommands根据你们KNOWN_AGENT_COMMANDS的实际结构写。如果它是数组:如果它是
{ id, command }[]:如果它是
Record<agentId, command>:5.
useIpcEvents.ts:你现在这段可以保留这段断开时清缓存是对的:
可以再补一个状态:如果你们有
connecting/reconnecting,也可以清一次,避免重连过程中沿用旧 relay 的空结果:但这个不是必须,核心还是 relay 检测命令和 store 缓存。
最小改动优先级
按收益排序:
preflight.detectAgents改成$SHELL -lc + command -v + common PATH fallback。detected-agents.ts加 TTL / force refresh,避免空数组长期缓存。refreshRemoteAgents。useComposerState.ts加connectionIdguard。useIpcEvents.ts断线/重连时清远程缓存,已有逻辑基本 OK。真正能解决“远程检测不到”的关键不是
useComposerState.ts,而是:relay 执行检测时要模拟用户远程 shell 的 PATH,并且 renderer 不能永久缓存第一次的空结果。LesleyMurfin commentedon Jun 22, 2026
Thanks @hufeide — your
detectAgents/ PATH diagnosis is pointing at the right area, but one part is already handled: the relay isn't running barewhichon a non-login shell.mainalready does/bin/sh -lc 'command -v "$1"'plus a PATH fallback in the relay preflight handler, so the-lc/command -vchange you proposed is effectively already shipped.Verifying against
main, the actual gap is two narrower defects:/usr/local/bin,/opt/homebrew/bin,/usr/bin,/binbut not~/.local/bin,~/.cargo/bin,~/.bun/bin,~/.opencode/bin. So an agent installed under$HOMEcomes back empty.[]is treated as truthy and never re-detected, so even after you fix PATH it stays "not found" until a full disconnect/reconnect.#6029 addresses both (widen the relay PATH fallback to the user-home bins; stop pinning empty detection results). Credit to you for surfacing the remote-detection case clearly.
brennanb2025 commentedon Jun 29, 2026
Taking a look 👀
brennanb2025 commentedon Jun 29, 2026
Short answer: yes — you can run agents on the remote Linux server and drive them from your Windows desktop, and the "agents not detected on the remote" problem you hit is a bug that's already fixed in a newer build.
How the setup works
The agents, terminals, and workspaces all live on the Linux server; the Windows desktop is just the front-end. The mechanism is the headless runtime (
orca serve) plus a "Remote Orca Servers" pairing.On the Linux server:
It runs in the foreground and prints a pairing link (
orca://pair?code=…).--pairing-addressis the important part for a remote box — set it to an address the client can reach (LAN IP, Tailscale IP, SSH-forwarded localhost, or a public tunnel), and make sure the port is open (--port, the examples use6768). Register your project so it shows up as a workspace:On your Windows desktop, either:
orca://pair?code=…link, then open that environment; ororca environment add --name my-server --pairing-code "orca://pair?code=..."Workspaces, terminals, and agents then run on the remote Linux host — launching an agent spawns it server-side. There's also a no-install option:
orca serveprints a browser URL with the pairing data embedded, so you can pair from any browser with nothing to install.The one requirement that bites people
Agent runtimes live on the server. Because agents spawn server-side, the agent CLI you want (e.g.
claude,codex,opencode) must be installed and onPATHon the Linux server, with its own auth/API key configured there — not on the Windows client.Your "remote agents not detected" screenshot
That was a real bug: detection couldn't see agents installed under your home directory (e.g.
~/.local/bin,~/.cargo/bin,~/.bun/bin,~/.opencode/bin), and once it returned "none found" it cached that empty result until you reconnected. Both parts are fixed in#6029, which shipped in v1.4.92. You reported this on 1.4.90-rc.0, which is just before the fix landed — so upgrading to v1.4.92 or newer should make remote agents show up (current builds are 1.4.105-rc.x), as long as the agent CLI is installed on the server per the note above.A first-class, display-free headless server mode (so you don't need a virtual display on a truly headless box) is still being tracked separately in
#4280/#4501— but the remote-agent workflow itself works today.nwparker commentedon Aug 23, 2026
Closing as answered — running agents on a remote Linux server works today (see thread).
Disagree? Please respond! I will re-visit this ticket in 5 days. If you respond, I will re-open it 🙏.