paperclip first configuration error for opencode
Version
latest
Operating System
Linux
What happened?
started docker container using this configuration:
services:
holycode:
image: coderluii/holycode:latest
container_name: holycode
restart: unless-stopped
shm_size: 2g
ports:
- "4096:4096"
- "8642:8642"
- "3100:3100"
volumes:
- ./data/opencode:/home/opencode
- ./local-cache/opencode:/home/opencode/.cache/opencode
- ./workspace:/workspace
environment:
- PUID=1000
- PGID=1000
- OPENCODE_DISABLE_AUTOUPDATE=true
- OPENCODE_DISABLE_TERMINAL_TITLE=true
- OPENCODE_MODEL=claude-sonnet-4-6
- OPENCODE_PERMISSION=auto
- OPENCODE_DISABLE_LSP_DOWNLOAD=true
- OPENCODE_DISABLE_AUTOCOMPACT=true
- OPENCODE_ENABLE_EXA=true
- OPENCODE_SERVER_PASSWORD=your-password
- OPENCODE_SERVER_USERNAME=opencode
- ENABLE_PAPERCLIP=true
at first configuration of Paperclip, when creating the first CEO i get an internal error:
running on nixos server with user davide with id 1000 that is in the docker group.
the docker-compose.yaml file is in ~/services/HolyCode
logs pasted
What did you expect?
I expect Paperclip to use opencode without issues
Steps to reproduce
- use the docker compose I've used
- open <machine ip/localhost>:3100
- follow instructions creating admin, company until CEO
- Select opencode as adapter
- Select deepseek v4 flash free (if still is available)
- notice error
Logs / Error output
holycode | [13:30:23] ERROR: POST /api/companies/0c13001c-c2ad-408f-9f72-c1a6f1be1f7b/adapters/opencode_local/test-environment 500 — EACCES: permission denied, lstat '/root/.config/opencode' {"errorContext":{"message":"EACCES: permission denied, lstat '/root/.config/opencode'","stack":"Error: EACCES: permission denied, lstat '/root/.config/opencode'\n at async lstat (node:internal/fs/promises:1028:18)\n at async Promise.all (index 0)\n at async checkPaths (node:internal/fs/cp/cp:76:39)\n at async cpFn (node:internal/fs/cp/cp:65:17)\n at async prepareOpenCodeRuntimeConfig (file:///usr/local/lib/node_modules/paperclipai/node_modules/@paperclipai/adapter-opencode-local/dist/server/runtime-config.js:50:9)\n at async Object.testEnvironment (file:///usr/local/lib/node_modules/paperclipai/node_modules/@paperclipai/adapter-opencode-local/dist/server/test.js:98:35)\n at async file:///usr/local/lib/node_modules/paperclipai/node_modules/@paperclipai/server/dist/routes/agents.js:1237:28","name":"Error"},"reqBody":{"adapterConfig":{"model":"opencode/deepseek-v4-flash-free","dangerouslySkipPermissions":true,"timeoutSec":0,"graceSec":20}},"reqParams":{},"reqQuery":{}}
holycode | err: {
holycode | "type": "Error",
holycode | "message": "EACCES: permission denied, lstat '/root/.config/opencode'",
holycode | "stack":
holycode | Error: EACCES: permission denied, lstat '/root/.config/opencode'
holycode | at async lstat (node:internal/fs/promises:1028:18)
holycode | at async Promise.all (index 0)
holycode | at async checkPaths (node:internal/fs/cp/cp:76:39)
holycode | at async cpFn (node:internal/fs/cp/cp:65:17)
holycode | at async prepareOpenCodeRuntimeConfig (file:///usr/local/lib/node_modules/paperclipai/node_modules/@paperclipai/adapter-opencode-local/dist/server/runtime-config.js:50:9)
holycode | at async Object.testEnvironment (file:///usr/local/lib/node_modules/paperclipai/node_modules/@paperclipai/adapter-opencode-local/dist/server/test.js:98:35)
holycode | at async file:///usr/local/lib/node_modules/paperclipai/node_modules/@paperclipai/server/dist/routes/agents.js:1237:28
holycode | "errno": -13,
holycode | "code": "EACCES",
holycode | "syscall": "lstat",
holycode | "path": "/root/.config/opencode"
holycode | }
@SirStone thanks for the detailed report. The compose file, NixOS/UID note, mounted paths, and exact Paperclip stack trace were the useful pieces here. They pointed to a HolyCode container environment mismatch rather than a normal OpenCode model problem.
I pushed v1.0.11 with the fix.
HolyCode was already starting OpenCode with /home/opencode as its home, but Paperclip was dropping to the opencode user without the same HOME and XDG paths. The Paperclip OpenCode adapter then fell back to /root/.config/opencode, which caused the EACCES during first CEO setup.
The release starts Paperclip with the same OpenCode paths HolyCode prepares at boot:
/home/opencode/home/opencode/.config/home/opencode/.cache/home/opencode/.local/share/home/opencode/.local/state
The release also updates Paperclip to 2026.618.0 and refreshes the README, Docker Hub description, Podman guide, changelog, examples, security note, and translations so the Paperclip/OpenCode path and update flow are clearer.
Update with:
docker compose pull
docker compose up -d
The Docker publish workflow for v1.0.11 is running now. If docker compose pull does not pick up the fresh image immediately, give the registry publish a little time and run the same two commands again.
Your mounted paths are the right shape:
- ./data/opencode:/home/opencode
- ./local-cache/opencode:/home/opencode/.cache/opencode
- ./workspace:/workspace
One thing to separate after updating: if opencode/deepseek-v4-flash-free is no longer available from OpenCode, Paperclip may show a normal model/provider error instead. That would be separate from this filesystem permission bug.
fix confirmed, thanks!