opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]:Run opencode in private net

Open Moler1995 opened this issue 10 months ago • 5 comments

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.

Moler1995 avatar Jan 16 '26 05:01 Moler1995

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] avatar Jan 16 '26 05:01 github-actions[bot]

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

lzy19990121-tech avatar Jan 16 '26 07:01 lzy19990121-tech

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 avatar Jan 22 '26 02:01 OneOfLzx

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 avatar Jan 22 '26 13:01 Moler1995

mark

navieSimple avatar Mar 06 '26 02:03 navieSimple