Deploying Superbot #
push to main ──► tangled spindle (.tangled/workflows/deploy.yml)
docker build (type check + tests + dashboard build)
docker push atcr.io/superbot.evil.gay/superbot:{latest,<sha>}
│
TrueNAS SCALE ◄──────────┘ watchtower checks atcr.io every 60s and restarts
app "superbot" Superbot on a new :latest
▲
VPS (Caddy) superbot.evil.gay ──tailnet──► truenas-scale:30087
superbot.mmatt.net ──301──► superbot.evil.gay
Nothing reaches into the NAS. CI only publishes an image, and the NAS pulls it. tangled's runners can't reach private or tailnet addresses, so this is the only direction that works.
One-time setup #
-
App passwords for
superbot.evil.gay(bsky.app → Settings → Privacy and security → App passwords):superbot-ci: CI uses it to push images.superbot-truenas: the app uses it to sign the bot in and to pull images.
-
Spindle secret: on the tangled repo, go to Settings → Pipelines, pick the hosted spindle, then Secrets → Add
ATCR_APP_PASSWORD= thesuperbot-cipassword. -
First image: push to
main(or retry the latest pipeline). Check thatatcr.io/superbot.evil.gay/superbot:latestexists. -
DNS: in Cloudflare, on the
evil.gayzone:Arecordsuperbot→178.156.148.234(the VPS), DNS only (grey cloud). It overrides the*.evil.gaywildcard that points at the PDS.TXTrecord_atproto.superbot→did=did:plc:ulrdcgudase5ksj7cay2zhqt, so the bot's handle still resolves now that the hostname no longer reaches the PDS.
Keep the old
Arecordsuperbot.mmatt.net→178.156.148.234(DNS only) for the redirect. -
Caddy on the VPS: the live instance is
caddy-plausible, with its config in/etc/caddy/Plausiblefile. Add:superbot.evil.gay { bind 178.156.148.234 # The bot's handle. The PDS used to answer this, before the hostname moved here. respond /.well-known/atproto-did "did:plc:ulrdcgudase5ksj7cay2zhqt" reverse_proxy 100.113.28.18:30087 } superbot.mmatt.net { bind 178.156.148.234 redir https://superbot.evil.gay{uri} permanent }then run
caddy-plausible validate --config /etc/caddy/Plausiblefile --adapter caddyfile && systemctl reload caddy-plausible. -
TrueNAS registry: go to Apps → Configuration → Docker Registries → Add Registry. Use
https://atcr.ioas the custom registry URI,superbot.evil.gayas the username, and thesuperbot-truenasapp password. TrueNAS needs the registry credentials before it can create the Superbot container. -
TrueNAS app: go to Apps → Discover → ⋮ → Install via YAML, name it
superbot, and pastetruenas-compose.yaml. ReplacePASTE_BOT_APP_PASSWORDwith thesuperbot-truenaspassword.
The server creates its session secret and OAuth signing key on first boot. They live in the superbot-data volume, with the SQLite database.
Day to day #
- Deploy: push to
main. About a minute after CI finishes, watchtower restarts Superbot on the new image. - Roll back: in the TrueNAS app YAML, change
:latestto:<commit sha>(every build is also tagged with its commit) and save. Watchtower leaves pinned tags alone. Switch back to:latestto resume auto-deploys. - Skip a deploy:
git push -o skip-ci. - Logs: TrueNAS → Apps → superbot → Logs, for the
superbotandwatchtowercontainers.