Back
A Homelab AI Dev Platform Built on OpenCode and GitOps
SiTech AI Team3 წთ. საკითხავი

A Homelab AI Dev Platform Built on OpenCode and GitOps

A homelab operator writing as Rsgm has described turning a TrueNAS host into an AI-assisted development platform: OpenCode runs as a server with its own web UI, pushes changes to Git, and a GitOps pipeline deploys them once he approves the pull request.

A homelab operator who writes as Rsgm has described how he turned a TrueNAS host into an AI-assisted development platform. OpenCode runs as a server with its own web UI, pushes changes to Git, and a GitOps pipeline deploys them once he has approved the pull request. The write-up, published on 14 June, covers roughly a dozen Docker Compose stacks and the reasoning behind keeping the model away from the services it edits.

From Claude Code to a vendor-agnostic coding agent

He had been using Claude Code, but says AI providers have been squeezing the value out of customers through token limits, so he looked for something vendor agnostic with support for the major plugins and settled on OpenCode. The decisive discovery was that it ships with a built-in web server and web UI. He built a small VM on the TrueNAS host with basic dev tooling and runs the OpenCode web server as a systemd unit, which gives him a terminal, a file browser, Git diffs and Git worktree support for running several coding sessions at once, plus mobile-friendly question and answer popups.

Guardrails: a separate Git user and mandatory PR review

OpenCode gets its own user on the Git server with dedicated SSH keys. It can clone projects and push feature branches, but it cannot push directly to the deploy branch, so every change passes through a pull request that he merges himself — a setup he calls cute but, more importantly, one that keeps unreviewed code from being deployed. The VM has internet access and can reach the Git server, but it cannot reach the services themselves. Because the blast radius stays small, he is comfortable granting root on the VM when build tools or test dependencies need installing. The first payoff was container maintenance: instead of spending hours reading release notes and checking for breaking changes, he now reads an AI summary in minutes, and most containers have gained health checks.

The GitOps chain, and the missing CI feedback

Deployment runs through Arcane for Docker service changes, a GitOps plugin for Home Assistant configuration and a Cloudflare Pages worker for the blog. He migrated the services from TrueNAS to Arcane projects so the Compose stacks are stored in Git, and found the combination with OpenCode worked better than expected: updating networking across containers, which used to mean hours of tracing connectivity through the stacks, can now be started from his phone. The missing piece is CI feedback. On GitHub he points a coding agent at Actions logs to diagnose failing tests, linter errors, stack traces and infrastructure plan changes, but Forgejo does not expose job logs through its public API, and he would rather not build around undocumented endpoints.

SSiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.