Files
Athena-Deck/integrations/opencode-athena/UPGRADE-V2-2026-10-14.md
T

9.2 KiB

Unraid OpenCode 2.0.29 migration

Upgraded the existing OpenCode container from 1.18.34 to 2.0.29 at the user's explicit request. The official Docker image was pinned by digest and extended with the existing explicit Alpine packages. See Dockerfile.v2.

Active deployment

  • Local image: athena-opencode:2.0.29-20261014.
  • Built image ID: 7aba0864ba28a8c1910c0b360e7e6ca1e1f791dc0c6adbbdaf53d28083b4b701.
  • Official base digest: sha256:02a049e0d69c5700cdeb3be02a2882a67de87117f1ed5305f6c5cc204a2f4dc6.
  • Command: opencode serve --hostname 0.0.0.0 --port 4096.
  • Preserved the existing network, port 4096 binding, environment, restart policy and Unraid management labels. The V2 working directory is /workspace.
  • Preserved both bind mounts, including host paths and write access: /mnt/nvme-storage/appdata/OpenCode -> /root, and the existing Unraid development Workspace directory -> /workspace.
  • Updated my-OpenCode.xml in Unraid's user templates to the new local image and serve command. Protected a copy of the original template with the migration backup.
  • Persisted the image recipe at /mnt/nvme-storage/appdata/OpenCode-build/Dockerfile for local rebuilding.

Git, SSH, Node 24.18.1, Python 3.14.8, pip, ripgrep and Chromium are baked into the new image, rather than relying on a former container's writable layer. The explicit package set matches the former container's /etc/apk/world extras.

Configuration and private data

Retained the supported V1 global config rather than rewriting credentials and provider settings. V2 normalizes this configuration in memory. The only model config adjustment removed 27 legacy variant entries with disabled: true across nine models. V2 otherwise interpreted those as settings and showed three extra ineffective low/medium/high options. The five existing named Thinking variants remain on the Qwen/Strata profiles, with their reasoningEffort values preserved.

All twelve Athena models are present with their original context limits: Medium/Holo4 160000, Fast 76800, Unzensiert/Lukes 131072, Large 192000, Ultra 262144, Gemma 32768, GLM 200000, Strata 262144, Strata 512K 524288, Strata Dual 262144 per request. Tool/image metadata is retained. This is metadata validation and a representative live generation test, not generation tests of all twelve models or new full-context/vision benchmarks.

Global AGENTS.md, DuckDuckGo, Gitea launcher/binary/venv, Git credentials, SSH files and other existing home contents remain in the persistent home. No authentication value, private message or raw production log was emitted or committed for migration. V2 accepted the existing server authentication internally. The browser offers password sign-in or pairing. The user signed in personally for visual acceptance; no password was read and no authentication bypass or replacement token was generated for that UI check.

Backup and rollback

Protected root-only migration directory: /mnt/nvme-storage/appdata/OpenCode-upgrade-20261014 (0700 parent, protected metadata/environment files). This is a private migration snapshot, NOT a public Git artifact or a substitute for the encrypted full-system backup. It contains the quiescent original home copy, original container inspection, environment file, baseline session IDs, and original Unraid template.

Both known projects were checked idle immediately before stopping V1. Copied the whole persisted home only after the server stopped, including the SQLite database/WAL state and credentials. First validated V2 against a separate private home copy with the production workspace mounted read-only. Then started V2 on the original persistent home and workspace mounts. Only OpenCode was replaced; Athena Deck, Strata, OpenWebUI and the hosts were not restarted.

The temporary validation container/home and stopped V1 container were removed after successful production backend checks. The original private home snapshot, inspection, template and original image remain. Rollback requires stopping V2, preserving its current home separately, restoring the original home snapshot, and recreating the old container from its saved specification/template. Rebuild a V1 runtime from the original 1.18.34 image with the same tool packages from Dockerfile.v2 if needed; do not assume the original image contains the former container's writable-layer tool installs. Do not run V1 against the migrated home. Full rollback onto a fresh host has not been tested.

Verified behavior

  • V2 reports version 2.0.29 and V1 migration status completed.
  • All 12 original session IDs are present in the new session table/API.
  • Compared all original legacy table rows byte-for-byte through internal digests: 12 sessions, 1305 messages and 5138 parts are unchanged, both in staging and production. No message bodies were emitted by these checks.
  • All twelve Athena models, contexts and expected Thinking variants are listed.
  • Both MCPs report connected in the production V2 API.
  • A synthetic generation through V2 and the existing Athena endpoint returned the requested marker successfully.
  • A synthetic OpenCode agent session successfully used the shell and MCP code mode to determine the HORIZON branch, find michael/HORIZON via Gitea and search Apple AVAudioEngine documentation via DuckDuckGo. Completed tool states and returned result markers were checked, not just the assistant's success claim.
  • A second synthetic turn created exactly one named Python file in HORIZON and ran its two arithmetic assertions successfully. Independently executed it and verified FILE_TEST_OK. V2's VCS status and diff APIs included that exact file and code. Removed only the synthetic file and synthetic test session afterward; HORIZON is clean again and original session count remains 12.
  • Browser acceptance after the user signed in: all twelve original recent sessions were visible on the home page without adding a project first. Added the existing /workspace/HORIZON project through the folder picker; the draft correctly resolves its Git branch main after loading. All twelve Athena models were initially hidden by model visibility preferences; enabled the Athena Deck group in Manage Models and verified the full model picker, including 512K and Dual-Slot. Selected Dual-Slot in the empty draft and verified Default plus the five named Thinking variants. No user prompt was submitted during this UI check. Review behavior was verified through the synthetic status/diff test above, not a further production edit.
  • Cross-browser UI preference synchronization has NOT been verified or promised by this upgrade. Project shortcuts were initially empty in this browser even though recent sessions were visible.

Rebuild / native deployment notes

Rebuild on Unraid with docker build -f Dockerfile.v2 -t athena-opencode:2.0.29-20261014 ., then use the saved Unraid template and persistent private home/workspace mounts. The local image is not a published registry tag; future upgrades require updating the pinned recipe, rebuilding and acceptance. Do not replace it with the bare upstream image and lose the installed MCP/tool dependencies. Upstream CLI/database upgrades must be performed only while idle.

For a future native Debian OpenCode deployment, install the official V2 CLI (documented npm package @opencode/cli@2.0.29 or matching vendor binary), Git, Python/venv/pip, Node, openssh-client and ripgrep explicitly; install Chromium if browser workflows are required. Run opencode serve as the intended service user under systemd with explicit HOME, working directory, interface and port. Restore private config/data/auth and workspace with matching ownership; adjust the two MCP launch paths and /workspace instructions to that user's paths. Keep server credentials in a protected environment file, never a unit or Git. This external client migration does not implement Athena Deck's future native installer. Native end-to-end installation/restore remains untested.

References:

Follow-up: Breakout session location

Moved the existing Breakout Clone session through the V2 session move API from /workspace to /workspace/breakout after the user confirmed it was idle. The installed API accepts {directory: ...}; an older documented destination object was rejected without applying the move. The accepted request returned 204 and a subsequent read confirmed the same session ID with the destination project. No container restart, clone, or source-file move was performed. The parent /workspace Git repository rejects ownership; the actual breakout repository resolves correctly on main. It was clean at the move check. Later read-only inspection confirmed edits to breakout/index.html; a missing temporary /tmp/opencode/pu-test.js was a test-harness issue, not a relocated project. The user observed that opening Review initially showed no changes, while later edits appeared with the panel open. No exact upstream bug or fix was confirmed.

The migration snapshot described above exists as recorded during migration; a fresh-host restore was not tested. This follow-up does not certify the current backup schedule or all integrations. Other local uncommitted work remains to be reviewed separately and must not be treated as already pushed.