Docker Deployment
Full Docker deployment guide pending
This page used to be built on top of the demos/codex-telegram-squad/ Dockerfile + docker-compose, which was removed during the #198 docs rewrite — the old paths are stale. The full Docker deployment guide (hub + dashboard + multi-agent one-shot compose) is queued for the v0.11+ doc rework.
Until then, the section below is the minimum "this actually works" path.
Recommended path: npm + tmux (most reliable)
Most self-hosters actually run npm global install + tmux + anet project up. It's lighter than docker compose, easier to debug, and iterates faster. See:
- One-shot install (multi-agent + tmux) —
setup-anet.shspins up hub + dashboard + multiple agents on a blank Ubuntu/Debian box in one command - npm deployment guide — manual, step-by-step
- Production / public-internet deployment — TLS / firewall / backup / public-internet risks
All @sleep2agi/agent-network CLI commands (anet hub start / anet hub dashboard / anet node create/start / anet project up/restart/down) behave identically inside a plain Docker container and on bare host — just treat the container as "Ubuntu with Node.js + Bun".
Want to write your own Dockerfile?
The repo ships a few test-grade Dockerfiles you can steal as a starting point:
tests/Dockerfile— Node.js + Bun base image + anet install, minimumtests/qa-hub-13-server-health-agents/Dockerfile— runnable hub + multi-agent reference
These are release-gate test images, not optimized for production (no multi-stage / no pinned hashes / no non-root user). Add your own hardening before production.
Startup order
Whether docker compose or plain tmux, the per-box startup order is the same:
anet hub start --host 0.0.0.0(bind LAN; default127.0.0.1is fine for purely local use)anet hub dashboardanet login --username admin --password <your-password>(the firstanet hub startauto-bootstrapsadmin/anethub— runanet passwdto change the password before any public-internet deploy)anet node create <alias>× N (one config per agent)anet project upto bring every node in cwd up
A containerized version is just steps 1–5 split across different services / containers.
Common pitfalls
bunxpullingcommhub-serveris slow on first boot: the firstanet hub startfetches a PINNEDcommhub-serverfrom npm — first-time container startup can be 30–60s slower than host (cache lives at$HOME/.bun/install/cache). Pinning a base image and pre-warming the cache helps a lot- Dashboard container must reach Hub: the Dashboard uses REST + SSE against hub
:9200— either share a docker network across containers or publish hub's port to the host - Persist per-node cwd:
anet node startwrites state under cwd.anet/nodes/<alias>/— mount cwd as a volume if you want it to survive container restart - Don't run the agent as PID 1: wrap it with
tinior similar; otherwise SIGTERM hits the agent directly and bypasses the CommHub offline notification
Next
- npm deployment guide — non-Docker step-by-step
- Production / public-internet deployment — TLS / firewall / backup / safety
- One-shot install — fastest path