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-05-12 19:01:24 +08:00
WEBUI_IMAGE = ekkoye8888/hermes-web-ui docker compose up -d
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
2026-05-12 19:01:24 +08:00
docker compose up -d --build
2026-04-20 19:55:31 +08:00
docker compose logs -f hermes-webui
```
## Services
2026-05-12 19:01:24 +08:00
This compose file runs a single service:
2026-04-17 03:13:24 +08:00
2026-05-12 19:01:24 +08:00
- `hermes-webui` — Web UI dashboard with integrated Hermes Agent runtime (pre-built image or built from source)
2026-05-19 16:09:59 +08:00
The Web UI container is built on the `nousresearch/hermes-agent` base image and uses the Hermes CLI / agent bridge runtime for chat execution. It does not start or manage a separate Hermes gateway process.
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 |
2026-05-12 19:01:24 +08:00
| `HERMES_AGENT_IMAGE` | `nousresearch/hermes-agent:latest` | Hermes Agent base image (used only during build) |
| `WEBUI_IMAGE` | `hermes-web-ui-local:latest` | Web UI image (set to `ekkoye8888/hermes-web-ui` to use pre-built) |
2026-04-20 19:55:31 +08:00
| `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 \
2026-05-12 19:01:24 +08:00
docker compose up -d
2026-04-20 19:55:31 +08:00
```
Or create a `.env` file in the project root:
```
2026-05-12 19:01:24 +08:00
WEBUI_IMAGE=ekkoye8888/hermes-web-ui
2026-04-20 19:55:31 +08:00
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-05-12 19:01:24 +08:00
- Web UI data persists in `./hermes_data/hermes-web-ui/` , mapped to `/home/agent/.hermes-web-ui` in the container.
2026-04-21 12:35:48 +08:00
- 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
2026-05-12 19:01:24 +08:00
| Port | Description |
|---|---|
| `${PORT}` (6060) | Web UI dashboard |
2026-05-19 16:09:59 +08:00
No Hermes gateway ports are exposed by this compose setup.
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-24 12:52:14 +08:00
- Profile-specific chat runs are handled through the Hermes agent bridge. The selected/requested profile is authorized per account and passed with runtime requests; switching the frontend Hermes Profile does not restart the bridge or clear other running tasks.
2026-05-19 16:09:59 +08:00
- The Web UI does not automatically start or manage a Hermes Agent gateway process on startup.
2026-04-17 03:13:24 +08:00
## Common Operations
2026-05-12 19:01:24 +08:00
Recreate:
2026-04-17 03:13:24 +08:00
``` bash
2026-05-12 19:01:24 +08:00
docker compose up -d --force-recreate
2026-04-17 03:13:24 +08:00
```
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
```