opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Suppport for airgapped installation

Open mahabal-org-ind opened this issue 4 months ago • 20 comments

I want to run opencode in kubernetes in an airgapped environment, which only has access to my model endpoint. I installed opencode in my docker image using

RUN curl -fsSL https://opencode.ai/install | bash

But when I try to run opencode in my pod after deployment, I get the following error:

> OPENCODE_CONFIG=claude.jsonc opencode run "what is 2+2"

INFO  2025-08-24T16:33:14 +0ms service=plugin [email protected] loading plugin
INFO  2025-08-24T16:33:14 +1ms service=bun pkg=opencode-copilot-auth version=0.0.2 installing package using Bun's default registry resolution
INFO  2025-08-24T16:33:14 +0ms service=bun cmd=["/root/.opencode/bin/opencode","add","--force","--exact","--cwd","/root/.cache/opencode","[email protected]"] cwd=/root/.cache/opencode running
INFO  2025-08-24T16:33:14 +26ms service=bun code=1 stdout=bun add v1.2.19 (aad3abea)
 stderr=Resolving dependencies
Resolved, downloaded and extracted [6]
error: ConnectionRefused downloading package manifest opencode-copilot-auth
 done
ERROR 2025-08-24T16:33:14 +6ms service=default pkg=opencode-copilot-auth version=0.0.2 name=BunInstallFailedError message=BunInstallFailedError cause=Error: Command failed with exit code 1 fatal

I would love it if there was a config or environment variable which would prevent network access of any kind, except the model API call. Thanks.

mahabal-org-ind avatar Aug 24 '25 16:08 mahabal-org-ind