Container Deployment (Incus) π‘ BETA
Use this runbook when you need the reference single-host stack that the installer creates as Incus instances.
When to use
- A production or staging stack on one Linux host where components need isolation.
- A host where you want host-mounted data and snapshot-based recovery.
- Do not use it for Kubernetes scheduling or for a Windows desktop install; see Kubernetes Deployment and Installation.
Incus is the only supported container layer. lxc and lxd are not substitutes; a legacy helper that shells out to them is not a supported path.
Before you start
| Check | Requirement |
|---|---|
| Host OS | Ubuntu 24.04 is the reference image for spawned instances. |
| Host tooling | incus installed and sudo incus admin init --auto completed. |
| User | Account in incus-admin (log out and back in after adding). |
| Data | Host directories under botserver-stack/ sized for PostgreSQL, Drive and logs. |
| Authority | Root AGENTS.md for ports and containers; botserver/3rdparty.toml for component versions. |
All commands below run on the host, not inside a container.
Steps
- Select container mode with
./botserver --container. The installer creates{tenant}-{component}instances, copies binaries and configuration, adds theeth0NIC and port proxy devices, then starts the systemd unit inside each instance. - Confirm the instance list with
incus list. The usual names are{tenant}-tables(PostgreSQL),{tenant}-drive(OtterIO),{tenant}-cache(Valkey) and, when enabled,{tenant}-llmand{tenant}-email. - Keep data on the host mounts:
botserver-stack/{tables,drive,cache}/data,confandlogsmap to/opt/gbo/data,/opt/gbo/confand/opt/gbo/logsinside the instance. Deleting an instance does not delete those directories. - Apply resource limits and take a snapshot before a change:
bash incus config set default-tables limits.cpu 2 incus config set default-tables limits.memory 4GiB incus snapshot create default-tables pre-upgrade-$(date +%Y%m%d)
Verify
| Check | Command / expected result |
|---|---|
| Instance running | incus list shows RUNNING for each component. |
| Database accepts connections | incus exec default-tables -- psql -U gbuser botserver -c 'SELECT 1' |
| Service logs | incus exec default-tables -- journalctl -u tables shows no repeated failures. |
| API health | curl -s -o /dev/null -w '%{http_code}' http://localhost:8080/health returns 200. |
| Port binding | incus config device list <instance> lists the expected proxy devices. |
| Runtime rule | python3 scripts/check_container_runtime.py --check passes; no lxc/lxd spawn and no raw Command::new("incus"). |
If a port is reachable only from the host, inspect the NAT rules written by configure_iptables_nat.rs; DNAT must use the external interface.
Roll back
- Stop the changed instance:
incus stop default-tables. - Restore by copying the snapshot to a new instance, then swapping names:
incus copy default-tables/pre-upgrade-YYYYMMDD default-tables-restored. Incus has no in-place restore for a running instance. - Re-run the Verify table. If data must move between host and container, dump with
pg_dumpto/tmpand reload throughincus exec ... -- psql; never place a backup in the repository.
Limits
| Limit | Source / value |
|---|---|
| Container runtime | Incus only (root AGENTS.md). |
| Instance names | Derived ({tenant}-{component}); Vibe uses {project}-{env}[-runner] and refuses platform names. |
| Build-time gate | Incus spawned through SafeCommand; shrink-only allowlist in scripts/container_runtime_allowlist.txt. |
| Placeholder images | The bootstrap tries ubuntu:24.04, then 22.04, then Debian 12/11; the first that launches wins. |
Related
- Installation β local setup.
- Docker Deployment β experimental, no image is published.
- Infrastructure Design β the single-host service layout.