From 5d0eddeea4b87e4240ae863f3082f79a63208b87 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Sat, 27 Jun 2026 08:25:40 -0700 Subject: [PATCH] updated opencode readme --- opencode/README.md | 58 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/opencode/README.md b/opencode/README.md index be5b903..864048c 100644 --- a/opencode/README.md +++ b/opencode/README.md @@ -13,12 +13,60 @@ OpenCode is an open source AI coding agent. ## Config file -You can copy the config.json file to your volume. Change the model and host data to your settings. +The `config.json` at `opencode/config/config.json` is pre-configured for +Ollama. Available models include: -## Gotcha +| Model | Default | Purpose | +|---|---|---| +| `qwen2.5-coder:14b` | default | Coding & agent tasks (recommended for this repo) | +| `qwen3:8b` / `qwen3:8b-16k` | | General purpose, tool support | +| `qwen2.5:7b` | | Lightweight general purpose | +| `mistral:latest` / `mistral-small3.2:latest` | | Chat & multilingual | +| `llama3.1:8b` | | General purpose | -Config ollama: https://github.com/p-lemonish/ollama-x-opencode +Tested on an NVIDIA GeForce RTX 5060 Ti (16 GB VRAM). -## ENV +To use a custom config with `VOL_PATH=/data`, copy it to: -OPENCODE_SERVER_PASSWORD (complains if not set) +``` +/data/opencode/config/config.json +``` + +## Ollama + +This stack requires the [ollama](../ollama/) stack to be running. The config +connects to `http://localhost:11434/v1` inside the container. + +To use a host-side ollama instead, set `OLLAMA_HOST=http://host.docker.internal:11434`. + +## Environment Variables + +- `OPENCODE_SERVER_PASSWORD` — required. Set a strong password for the web UI. +- `OLLAMA_HOST` — Ollama API endpoint (default `http://localhost:11434`) +- `OPENCODE_PORT` — Web UI port (default `4096`) +- `VOL_PATH` — Base path for persistent data (default `/data`) + +## Volume Notes + +With `VOL_PATH=/data`: + +| Container path | Host path | Purpose | +|---|---|---| +| `/config` | `/data/opencode/config` | Config files (config.json) | +| `/data` | `/data/opencode/data` | OpenCode state | +| `/projects` | `/data/opencode/projects` | Workspace/project files | + +## Network Notes + +Requires proxy network + +## dockhand Stack, Deploy from Git + +Cookbooks Repository +stackname: opencode +Compose file path: opencode/compose.yaml +Additional env file (optional): opencode/sample.env + +Then "Load" opencode/sample.env into the Environmental variables in dockhand. + +Create the Stack