# Hermes Agent in Docker

> Run Hermes Agent in a container: EnvHaven's open-source image with Hermes Agent built in, a managed workspace with nothing to run, and the folders and keys a container of your own has to keep.

_Updated November 23, 2026 · Checked against Hermes Agent 0.19.0 in EnvHaven v1.9.0_

A container keeps whatever Hermes Agent does with full access away from your own files, which makes it the usual home for unattended runs. EnvHaven is built on that idea in two forms: a managed workspace, which is the container already running on a server of its own, and the open-source workspace image, which you run with Docker yourself.

## A managed workspace: nothing to run

1. Open your workspace in any browser. It is the EnvHaven container on its own always-on server, with an HTTPS address for what you build.
2. Tap **Launch**, choose Hermes Agent and tap **Sign in**: it runs `hermes setup` for you in the terminal. For an API key, choose **Set key** instead and paste `OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `GOOGLE_API_KEY`; the workspace keeps it write-only.
3. Start it with one tap: signed in, Hermes Agent gets a green dot in the Launch menu and an icon in the workspace's top bar. Support is built in (0.19.0), so there is nothing to install or update.
4. Give it a task. Runs with the default smart approvals; add `--yolo` for unattended runs.

## The EnvHaven image, on your own Docker

The workspace image is MIT-licensed and ships Hermes Agent 0.19.0 beside 16 other agents. Its home is `/config`, so one volume keeps every agent's settings and sign-in when the container is replaced:

```bash
docker run -d \
  --name envhaven \
  -p 8443:8443 \
  -p 2222:22 \
  -e PASSWORD=password \
  -e SUDO_PASSWORD=password \
  -v envhaven-config:/config \
  ghcr.io/envhaven/envhaven:latest
```

Open `http://localhost:8443`, run `hermes` in the terminal and sign in. The [self-hosted guide](https://envhaven.com/guides/self-hosted-dev-environment) covers SSH and Haven CLI against it.

## What a container for Hermes Agent has to keep

Hermes Agent keeps its settings in `~/.hermes` ([source](https://hermes-agent.nousresearch.com/docs/user-guide/configuration)). API keys live in `~/.hermes/.env` and OAuth sign-ins in `~/.hermes/auth.json`.

In a container of your own, mount a volume there so a rebuilt container stays signed in, or pass `OPENROUTER_API_KEY`, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY` or `GOOGLE_API_KEY` as an environment variable instead of signing in.

## Full access inside the container

For one session:

```bash
hermes --yolo
```

As the default, in ~/.hermes/config.yaml:

```yaml
approvals:
  mode: off
```

The default approval mode, `smart`, has a second model approve low-risk commands, deny dangerous ones and ask about the rest. `--yolo` (or `/yolo` inside a session) bypasses all dangerous-command prompts.

## Keep reading

- [Hermes Agent](https://envhaven.com/agents/hermes-agent)
- [Hermes Agent in the browser](https://envhaven.com/agents/hermes-agent/browser)
- [Hermes Agent on iPhone](https://envhaven.com/agents/hermes-agent/iphone)
- [Hermes Agent on iPad](https://envhaven.com/agents/hermes-agent/ipad)
- [Hermes Agent on Android](https://envhaven.com/agents/hermes-agent/android)
- [Hermes Agent on a Chromebook](https://envhaven.com/agents/hermes-agent/chromebook)
- [Coding agents in Docker](https://envhaven.com/agents/docker)

Source: https://envhaven.com/agents/hermes-agent/docker
