Repository navigation
Description
Description
OpenCode 1.18.19 cannot be used concurrently from two separate Linux hosts when both hosts use the same NFS-mounted home directory.
OpenCode works normally when used:
- On one host only; or
- From the same host, including with different OpenCode modes.
However, whenever OpenCode is running from one host, starting OpenCode from a second host using the same shared home directory fails, regardless of the selected mode or port.
Observed behavior:
- Starting
opencode webon one host and then startingopencodeon another host causes the second OpenCode instance to hang with a black screen. - Starting
opencode webfrom the second host fails with eitherServeError,Unexpected error, orLocking protocol. - The black screen remains indefinitely.
- Disconnecting the SSH session and starting a new session makes OpenCode usable again (assuming there is no OpenCode running on another host).
- The issue also occurs with a fresh and empty project directory, so it does not appear to depend on project-specific state.
- Using different ports does not resolve the issue.
- Using different combinations of TUI and web mode does not resolve the issue.
The hosts share an NFS-mounted home directory. The issue appears to be caused by host-independent locking or state files stored below the shared home directory.
Plugins
No response
OpenCode version
1.18.19
Steps to reproduce
Environment
- Two separate Linux hosts
- Ubuntu 24.04.4 LTS on both hosts
- NFS-mounted shared home directory
- Fish and/or Bash shells
- OpenCode 1.18.19
Reproduction
-
Log in to host A using the shared NFS home directory.
-
Start OpenCode, for example:
npx -y opencode-ai@latest web \ --port 8080 \ --hostname <HOSTNAME>
-
Leave OpenCode running.
-
Log in to host B using the same shared NFS home directory.
-
Start OpenCode:
opencode
-
Observe that the second instance hangs indefinitely with a black screen.
Alternatively:
-
Start
opencode web(or justopencode) on host A. -
Start
opencode webon host B, using either the same or a different port. -
Observe an error similar to:
! OPENCODE_SERVER_PASSWORD is not set; server is unsecured. Error: Unexpected error ServeErrorIn some cases:
Locking protocol
The same problem occurs when using different combinations of TUI and web mode. Changing the port does not resolve the issue.
Expected behavior
OpenCode should either:
- Support concurrent use from separate hosts sharing an NFS home directory; or
- Clearly document that a shared home directory is unsupported; or
- Use host-specific runtime and lock files so that separate hosts do not interfere with each other; or
- Fail with a clear error identifying the conflicting lock/state file and how to recover.
Actual behavior
- The second OpenCode instance hangs indefinitely with a black screen.
opencode webmay fail withServeError,Unexpected error, orLocking protocol.- The failure occurs even with different ports and different OpenCode modes.
- The problem occurs with a fresh and empty project.
- Disconnecting the hanging SSH session allows OpenCode to work again in a subsequent SSH session.
Screenshot and/or share link
Operating System
Ubuntu 24.04.4 LTS
Terminal
fish, bash
Activity
github-actions commentedon Aug 20, 2026
This issue might be a duplicate of existing issues. Please check:
Locking protocolerror and state files under the shared home directory.ambrustorok commentedon Aug 20, 2026
Thank you @github-actions. Setting
XDG_DATA_HOME(e.g.XDG_DATA_HOME=/path/to/workdir/ npx -y opencode-ai@latest web --port 8080 --hostname myhostname) does indeed solve this problem.I will however keep the issue open as I believe that this variable is too generic and is used by other tools too, thus it might interfere with other software.
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊