2026-04-17 03:13:24 +08:00
# Docker Compose Guide
This repository ships an environment-variable driven Docker Compose setup.
## Quick Start
2026-04-20 19:55:31 +08:00
### Pull pre-built image (Recommended)
2026-04-17 03:13:24 +08:00
``` bash
2026-04-20 19:55:31 +08:00
WEBUI_IMAGE = ekkoye8888/hermes-web-ui:latest docker compose up -d hermes-agent hermes-webui
2026-04-17 03:13:24 +08:00
docker compose logs -f hermes-webui
```
Open: `http://localhost:6060`
2026-04-20 19:55:31 +08:00
### Build from source
2026-04-17 03:13:24 +08:00
2026-04-20 19:55:31 +08:00
``` bash
docker compose up -d --build hermes-agent hermes-webui
docker compose logs -f hermes-webui
```
## Services
This compose file runs two services:
2026-04-17 03:13:24 +08:00
2026-04-20 19:55:31 +08:00
- `hermes-agent` — Hermes Agent runtime (image: `nousresearch/hermes-agent` )
- `hermes-webui` — Web UI dashboard (pre-built image or built from source)
2026-04-17 03:13:24 +08:00
2026-04-20 19:55:31 +08:00
## Environment Variables
All key runtime settings are configured from compose variables.
2026-04-17 03:13:24 +08:00
2026-04-20 19:55:31 +08:00
| Variable | Default | Description |
|---|---|---|
| `PORT` | `6060` | Web UI listen port |
2026-05-08 15:47:03 +08:00
| `BIND_HOST` | `0.0.0.0` | Optional Web UI bind host. Defaults to IPv4 for stable WSL/Windows access. Set `::` explicitly if you want IPv6 listening. |
2026-04-20 19:55:31 +08:00
| `HERMES_BIN` | `/opt/hermes/.venv/bin/hermes` | Path to Hermes CLI binary |
| `HERMES_AGENT_IMAGE` | `nousresearch/hermes-agent:latest` | Hermes Agent base image |
| `WEBUI_IMAGE` | `hermes-web-ui-local:latest` | Web UI image (set to `ekkoye8888/hermes-web-ui:latest` to use pre-built) |
| `HERMES_DATA_DIR` | `./hermes_data` | Hermes runtime data directory |
| `AUTH_DISABLED` | `false` | Set to `true` to disable login authentication |
2026-04-17 03:13:24 +08:00
2026-04-20 19:55:31 +08:00
Override variables directly from shell:
2026-04-17 03:13:24 +08:00
``` bash
PORT = 16060 \
2026-04-20 19:55:31 +08:00
AUTH_DISABLED = true \
docker compose up -d hermes-agent hermes-webui
```
Or create a `.env` file in the project root:
```
WEBUI_IMAGE=ekkoye8888/hermes-web-ui:latest
PORT=6060
AUTH_DISABLED=false
2026-04-17 03:13:24 +08:00
```
## Data Persistence
2026-04-20 19:55:31 +08:00
| Path | Description |
|---|---|
| `${HERMES_DATA_DIR}` (`./hermes_data` ) | Hermes runtime data (sessions, config, profiles) |
2026-04-21 12:35:48 +08:00
| `${HERMES_DATA_DIR}/hermes-web-ui` | Web UI data (auth token, etc.) |
2026-04-20 19:55:31 +08:00
- Hermes data persists in `./hermes_data` , mapped to `/home/agent/.hermes` in the container.
2026-04-21 12:35:48 +08:00
- Web UI data persists in `./hermes_data/hermes-web-ui/` , mapped to `/root/.hermes-web-ui` in the container.
- When `AUTH_DISABLED=false` , the auth token is auto-generated on first run and printed to container logs.
2026-04-20 19:55:31 +08:00
- Deleting the token file and restarting will generate a new one.
## Port Mapping
| Port | Service | Description |
|---|---|---|
| `${PORT}` (6060) | hermes-webui | Web UI dashboard |
| 8642-8670 | hermes-agent | Hermes Agent gateway ports (for multi-profile) |
2026-04-17 03:13:24 +08:00
## Code Runtime Behavior
- Hermes CLI binary comes from `HERMES_BIN` env (`packages/server/src/services/hermes-cli.ts` ).
- If `HERMES_BIN` is not provided, code falls back to `hermes` in `PATH` .
2026-05-08 20:46:22 +08:00
- Profile switching dynamically resolves upstream URLs via `GatewayManager` .
2026-04-17 03:13:24 +08:00
## Common Operations
Recreate webui:
``` bash
docker compose up -d --no-deps --force-recreate hermes-webui
```
2026-04-20 19:55:31 +08:00
View auth token:
``` bash
docker compose logs hermes-webui | grep token
# or
2026-04-21 12:35:48 +08:00
cat ./hermes_data/hermes-web-ui/.token
2026-04-20 19:55:31 +08:00
```
2026-04-17 03:13:24 +08:00
Stop:
``` bash
docker compose down
```