[FEATURE]:Run opencode in private net #6426

Closed
opened 2026-02-16 18:04:11 -05:00 by yindo · 4 comments
Owner

Originally created by @Moler1995 on GitHub (Jan 16, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I encountered an error when using opencode on a private network.It seems that opencode is trying to load resources from external networks during startup.
{
"name": "UnkownError",
"data": {
"message": "Error: The socket connection was closed unexpectedly. For more information, pass verbose:true in the second argument to fetch()"
}
}
Can make opencode run independently in a private network? With specific externel LLM API ports forward through proxy like nginx, preveventing opencode from communicating with other exeternal networks during startup.

Originally created by @Moler1995 on GitHub (Jan 16, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I encountered an error when using opencode on a private network.It seems that opencode is trying to load resources from external networks during startup. { "name": "UnkownError", "data": { "message": "Error: The socket connection was closed unexpectedly. For more information, pass verbose:true in the second argument to fetch()" } } Can make opencode run independently in a private network? With specific externel LLM API ports forward through proxy like nginx, preveventing opencode from communicating with other exeternal networks during startup.
yindo added the discussion label 2026-02-16 18:04:11 -05:00
yindo closed this issue 2026-02-16 18:04:11 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #8580: linux 启动报错 - The socket connection was closed unexpectedly error
  • #7155: [Bug] OpenCode Crashes on Launch When http_proxy Environment Variable is Set
  • #4924: Is it possible to use proxy?
  • #7313: Does OpenCode Require Internet APIs?
  • #8642: 在无网络连接的情况下用不了 - Unable to use without network connection
  • #7992: opencode connect OpenAI fails

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #8580: linux 启动报错 - The socket connection was closed unexpectedly error - #7155: [Bug] OpenCode Crashes on Launch When `http_proxy` Environment Variable is Set - #4924: Is it possible to use proxy? - #7313: Does OpenCode Require Internet APIs? - #8642: 在无网络连接的情况下用不了 - Unable to use without network connection - #7992: opencode connect OpenAI fails Feel free to ignore if none of these address your specific case.
Author
Owner

@lzy19990121-tech commented on GitHub (Jan 16, 2026):

I've met this problem too. Opencode is requiring model list from https://models.dev, which is not reachable in private network.

@lzy19990121-tech commented on GitHub (Jan 16, 2026): I've met this problem too. Opencode is requiring model list from https://models.dev, which is not reachable in private network.
Author
Owner

@OneOfLzx commented on GitHub (Jan 21, 2026):

If you’re on a private network, I’d use OpenCode Sentinel — it cuts all network access except to your LLM, so it works flawlessly in network-restricted environments 👍👍

Repo: https://github.com/oneoflzx/opencode-sentinel

@OneOfLzx commented on GitHub (Jan 21, 2026): If you’re on a private network, I’d use **OpenCode Sentinel** — it cuts all network access **except** to your LLM, so it works flawlessly in **network-restricted environments** 👍👍 Repo: https://github.com/oneoflzx/opencode-sentinel
Author
Owner

@Moler1995 commented on GitHub (Jan 22, 2026):

If you’re on a private network, I’d use OpenCode Sentinel — it cuts all network access except to your LLM, so it works flawlessly in network-restricted environments 👍👍

Repo: https://github.com/oneoflzx/opencode-sentinel

Great,I'll try it.

@Moler1995 commented on GitHub (Jan 22, 2026): > If you’re on a private network, I’d use **OpenCode Sentinel** — it cuts all network access **except** to your LLM, so it works flawlessly in **network-restricted environments** 👍👍 > > Repo: https://github.com/oneoflzx/opencode-sentinel Great,I'll try it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6426