How-To Series · Episode 57 / 59 · Module 9: Locking It Down

Hermes · In Docker

Run Hermes as an always-on container that survives reboots and upgrades cleanly.

After this videoYou can now run Hermes as an always-on container that upgrades without losing state.

The whole model is one idea: the image is stateless, and one data volume holds everything. Your config, keys, sessions, skills, and memories live in ~/.hermes on the host, mounted into the container at /opt/data, so you upgrade by pulling a fresh image and your data is never touched. Run setup once (docker run ... setup), then run detached as a gateway with --restart unless-stopped and -p 8642:8642. The flags that matter: -v the data volume (required), -p 8642 (API + health), --restart unless-stopped, HERMES_DASHBOARD=1, and --memory/--cpus limits. Running several agents? Use one container per profile, each on its own data dir and port, never two gateways on one directory. Upgrade with docker pull + recreate.

About these resources. Every command comes from the Docker doc. This episode covers running Hermes itself in Docker; the Docker terminal backend is in E58.

Sources · What this video distills

1 docs page · every command below traces to one of them
Primary · data volume, setup, gateway run, dashboard, multi-profile, upgrading
Docker
Read ↗

Commands shown · Copy and paste

each shows the source doc it came from
Setup (once)from source ↗
docker run -it --rm -v ~/.hermes:/opt/data nousresearch/hermes-agent setup
Always-on gatewayfrom source ↗
docker run -d --name hermes --restart unless-stopped -v ~/.hermes:/opt/data -p 8642:8642 nousresearch/hermes-agent gateway run
docker pull nousresearch/hermes-agent:latest · docker rm -f hermes · (re-run)

Going deeper · Related Hermes docs

further reading · not sources of facts shown above

Next in the series · Episodes that build on this

E56
Security: Approvals & Allowlists
E58
Configuration Deep Dive
E59
Environment Variables