Files
hermes-ice/homelab/concepts/opencode-cluster.md
Hermes Agent e4d91aadf9 Initial commit: homelab infrastructure wiki
- Full Obsidian vault content
- Host configs (ice, grizzley, ubuntu, proxmox, truenas, panda, hyte)
- Media stack documentation
- Traefik HA setup
- Automation scripts
- Bachelor party planning
2026-05-24 16:08:40 -07:00

2.1 KiB

title, created, updated, type, tags, sources
title created updated type tags sources
OpenCode Cluster 2026-04-28 2026-04-28 concept
concept
ai
services
../../homelab/docs/opencode-cluster.md
../../ai-assistant/host-context.md

OpenCode Cluster

OpenCode AI coding assistant deployed as systemd services across the homelab cluster, accessible via Traefik-routed HTTPS endpoints.

Instances

Instance Host IP Port Traefik Route Status
ubuntu Ubuntu VM 192.168.50.61 4096 opencode.tophermayor.com Active/Enabled
ice Raspberry Pi 4 192.168.50.197 4096 opencode-ice.tophermayor.com Active/Enabled
grizzley Raspberry Pi 5 192.168.50.84 4096 Inactive/Disabled

Service Management

All instances run as opencode-web.service via systemd:

# Check status
systemctl status opencode-web

# Restart
sudo systemctl restart opencode-web

# View logs
journalctl -u opencode-web -f

Shared Infrastructure

  • Qdrant (192.168.50.61:6333) — Shared vector memory backend for OpenCode cluster
  • Ollama (192.168.50.61:11434) — Local embedding generation

Configuration

Per-host config files in homelab/<host>/opencode/:

  • opencode.json — Main OpenCode configuration
  • oh-my-opencode.json — Framework configuration

Traefik Routing

OpenCode instances use dedicated Traefik middlewares:

  • local-only@file — IP whitelist
  • opencode-streaming@file — SSE support
  • opencode-cors@file — CORS headers

Agent Context Detection

Each OpenCode instance detects its host context via:

  • .opencode/opencode.json init file
  • Environment variables (HOST_CONTEXT, WIKI_PATH)
  • detect_host_context.py script

See host-context-detection for full detection table.

Wiki Integration

All OpenCode instances have WIKI_PATH=/home/bear/homelabagentroot/obsidian-vault in their environment, enabling them to read and write to the shared wiki.