SPB Git

Repository Public

0009-hosting-and-exposure.md 1.0 KB

# 0009 — Single host node behind the existing gateway; ingest never exposed publicly

Decision. The backend (three Go services, the Next.js server, PostgreSQL) runs on one always-on Mac of the cluster, placed and supervised with the existing deployment tool (PM2 processes). Only control-api is reachable from the Internet, through the existing gateway (Caddy TLS → WireGuard → node). PostgreSQL listens on loopback. telemetry-ingest listens on the LAN and tunnel addresses only.

Robustness on a single host. Agents buffer up to 6 hours while the backend is down and replay without duplicates; actions are durable and are never re-issued after a crash; nightly encrypted backups go to a second node and restoration is tested; every service restarts on its own and tolerates the database being unavailable.

Not done. No database replication or automatic fail-over: the recovery objective is "restore on another node from last night's backup + agents replay their buffer", documented in OPERATIONS.md.

Files main
Menu

Theme