Hermes Agent

How-To Guide

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.

Quick answer

If your Hermes agent suddenly acts trapped in a Docker container over the Discord gateway — losing .env, config.yaml, or mounted folders like an Obsidian vault — the terminal backend is running commands inside a container without your host paths mounted. Mount the directories you need, or separate the Docker terminal backend from the gateway.

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.

Deploy Hermes faster with FlyHermes

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. 1

    Check your terminal backend

    Open config.yaml and verify terminal: backend: is set to 'local' if you want local execution

  2. 2

    Verify Docker bindings

    If using Docker backend, check docker_volumes in config.yaml includes your .hermes directory

  3. 3

    Mount the .hermes directory

    Add docker_volumes: ["/home/user/.hermes:/root/.hermes"] to expose config and memory to the container

  4. 4

    Mount external directories separately

    For Obsidian vaults or other external data, add separate volume mounts rather than putting them inside .hermes

  5. 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.

FAQ

Why does Hermes lose config access after a Docker restart?

The .hermes directory was not mounted in the container. Add docker_volumes: ["/home/user/.hermes:/root/.hermes"] to config.yaml and restart the gateway so the container sees the same config, .env, sessions, memory, and skills as the host.

Why does Discord work but the bot says 'no bot token configured'?

The Discord token is in the host .hermes profile but the Docker container is not mounting that directory. Fix volume bindings first, then confirm the gateway process inside the container sees the same Hermes home path as the host CLI.

Can I use Hermes via Discord without Docker?

Yes. Run hermes gateway run directly on the host machine and Discord will work without container overhead. Use Docker only when you need isolated tool execution, cross-platform deployment, or a portable runtime image.

Related Guides