Fix Docker Container Issues When Using Hermes via Discord
Resolve issues when Hermes running via Discord suddenly appears inside a Docker container, losing access to config files and volumes.
When running Hermes via Discord gateway, the agent may suddenly appear to be inside a Docker container — losing access to .env, config.yaml, and external directories like Obsidian vaults. This typically happens after a Docker restart and requires proper volume bindings to fix.
Managed cloud · API costs included · Skill library · Cancel anytime
Before you start:
- ☑Hermes Agent running via Discord gateway
- ☑Docker installed on the host
- ☑Access to ~/.hermes/config.yaml
Steps
- 1
Check your terminal backend
Open config.yaml and verify terminal: backend: is set to 'local' if you want local execution
- 2
Verify Docker bindings
If using Docker backend, check docker_volumes in config.yaml includes your .hermes directory
- 3
Mount the .hermes directory
Add docker_volumes: ["/home/user/.hermes:/root/.hermes"] to expose config and memory to the container
- 4
Mount external directories separately
For Obsidian vaults or other external data, add separate volume mounts rather than putting them inside .hermes
- 5
Restart the gateway
hermes gateway restart to apply the new volume bindings
Pro Tips
- 💡Skills are mounted read-only (:ro) by design — changes sync from host to container automatically via the skill_manager tool
- 💡Don't put your Obsidian vault inside .hermes — mount it separately to avoid update conflicts
- 💡The docs at hermes-agent.nousresearch.com/docs/user-guide/docker cover the recommended mount points
- 💡After Discord replies in one test channel, use the Hermes WebUI dashboard and gateway status before adding public server channels; use FlyHermes if you do not want to own VPS/Docker uptime.
Troubleshooting
❌ Agent can't find config.yaml after Docker restart
✅ Your .hermes directory isn't mounted. Add docker_volumes: ["/home/user/.hermes:/opt/data"] to config.yaml and restart the gateway.
❌ Skills show as read-only inside container
✅ This is expected behavior. Skills are synced from host to container. When the agent modifies skills via skill_manager, it changes them on the host, then syncs to Docker.
❌ Obsidian vault not accessible from Discord session
✅ Mount the vault as a separate volume: docker_volumes: ["/path/to/vault:/root/obsidian"]. Don't nest it inside .hermes.