hermes-dashboard-traefik
Expose Hermes Dashboard via Traefik with SSL and systemd.
- License 许可
- MIT
- 最近更新
- 2026-10-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- hermes-dashboard-traefik
- author
- Tonthong
- license
- MIT
- version
- 0.1.0
- metadata
- { "hermes": { "tags": [ "Hermes", "DevOps", "Traefik", "Security", "Systemd" ] } }
- platforms
- [ "linux" ]
- description
- Expose Hermes Dashboard via Traefik with SSL and systemd.
03 SKILL.md 正文
Expose Hermes Dashboard via Traefik with SSL and systemd
This skill provides a step-by-step workflow to configure, run, and expose the Hermes Web Dashboard securely behind a Traefik reverse proxy using SSL certificates and a systemd user service.
This guide does not cover configuring third-party OAuth providers, which should be set up via Nous Portal or custom configurations if needed.
When to Use
- Exposing the local Hermes Web Dashboard to a remote domain (e.g.,
https://dashboard.example.com). - Setting up the dashboard to run persistently in the background on system boot using systemd.
- Restricting dashboard access using secure password hashes instead of plaintext keys.
Prerequisites
- Traefik reverse proxy running in a Docker container on the host.
- Python 3 with the
webextras installed in the active Hermes virtual environment (e.g.uv pip install -e ".[web,pty]"). - Standard Dynamic File Provider path mapped in the Traefik static configuration (e.g.
providers.file.directorypoint to/etc/traefik/dynamic).
How to Run
- Generate and configure the security keys for Basic Auth.
- Create and enable the Systemd service using the
terminaltool. - Apply the dynamic routing configuration file to Traefik using the
write_filetool.
Quick Reference
- Config Path:
~/.hermes/config.yaml - Dashboard keys:
dashboard.basic_auth.usernamedashboard.basic_auth.password_hashdashboard.basic_auth.secret
- Systemd user service path:
~/.config/systemd/user/hermes-dashboard.service
Procedure
Step 1: Generate Scrypt Password Hash
Do not write plaintext passwords. Generate a secure scrypt hash using the Python helper from the Hermes directory:
python3 -c "from plugins.dashboard_auth.basic import hash_password; print(hash_password('YOUR_SECURE_PASSWORD'))"
Step 2: Configure basic auth in config.yaml
Write the configuration options to the config file (replace the variables with your generated values):
hermes config set dashboard.basic_auth.username "YOUR_USERNAME"
hermes config set dashboard.basic_auth.password_hash "scrypt$16384$8$1$..."
# Generate a random 32-byte secret hex for JWT signing
hermes config set dashboard.basic_auth.secret "$(python3 -c 'import secrets; print(secrets.token_hex(32))')"
Step 3: Create Systemd User Service
Write a user service configuration to run the dashboard headless in the background. Use the write_file tool to save this to ~/.config/systemd/user/hermes-dashboard.service:
[Unit]
Description=Hermes Agent Web Dashboard
After=network.target
[Service]
Type=simple
ExecStart=/home/YOUR_USER/.local/bin/hermes dashboard --host 0.0.0.0 --port 9119 --no-open
Restart=always
RestartSec=5
WorkingDirectory=/home/YOUR_USER
[Install]
WantedBy=default.target
Note: Bind host to 0.0.0.0 to allow the Docker bridge network to communicate with it, or 127.0.0.1 if Traefik is running on host network.
Step 4: Start and Enable the Dashboard Service
Run the following commands using the terminal tool to start the service:
systemctl --user daemon-reload
systemctl --user enable hermes-dashboard --now
Step 5: Configure Traefik Dynamic File Route
Write the dynamic configuration using the write_file tool to your Traefik dynamic configuration directory (e.g. /home/user/docker/traefik/config/dynamic/hermes.yml):
http:
routers:
hermes-dashboard:
rule: Host(`dashboard.example.com`)
entryPoints:
- websecure
service: hermes-dashboard-srv
tls:
certResolver: namecom # replace with your certResolver name
services:
hermes-dashboard-srv:
loadBalancer:
servers:
# Use host gateway IP to route out of docker container to VPS localhost port
- url: http://10.0.2.1:9119
Note: Retrieve host IP address inside the docker network bridge by checking docker network inspect <network_name>.
Pitfalls
- Inside-Gateway Systemd Restarts: Do not run
systemctl --user restart hermes-dashboardinside an agent session spawned by the gateway. The gateway will kill the process tree before it can complete, resulting in a blocked command. Runkill <PID>instead to let systemd restart it automatically, or execute restarts from outside. - Docker host.docker.internal resolution: On Linux,
host.docker.internalmight resolve to the default docker bridge interface (10.0.0.1) rather than the custom user bridge (e.g.10.0.2.1). Always verify the real gateway IP viadocker network inspect <network_name>— look for theGatewayfield underIPAM.Config. Hardcode that IP in the Traefikhermes.ymlservice URL. - Traefik file provider: single file vs directory: If you need multiple dynamic config files (e.g.
dynamic.yml+hermes.yml), changeproviders.file.filename→providers.file.directoryintraefik.yml. Mount the directory (not individual files) indocker-compose.yml. A singlefilenamesetting silently ignores any additional.ymlfiles in the same folder. - HTTP 429 from Traefik is usually transient: A burst of requests (browser auto-refresh, agent health checks) can trigger rate limiting. If the site returns 302 when retried seconds later, the 429 was momentary — not a configuration bug. Check
dynamic.ymlfor an explicitrateLimitmiddleware before troubleshooting further. - Kanban reviewer iteration exhaustion: The
reviewerprofile can exhaust its 150-iteration budget if it attemptsdelegate_taskfor subagent verification inside a Kanban worker context. When a Kanban task ends upblockedafter a crash: runhermes kanban unblock <task_id>thenhermes kanban dispatchto retry cleanly.
Verification
Test the response using the terminal tool to verify dynamic SSL routing and basic auth redirect are operational:
curl -I -k https://dashboard.example.com
You should get a 302 Found response directing you to /login?next=%2F.
04 同仓库更多 Skills
writing-plans
Write implementation plans: bite-sized tasks, paths, code.
subagent-driven-development
Execute plans via delegate_task subagents (2-stage review).
react-composition-2026
Teaches modern React composition patterns for 2025/2026. Use when designing component APIs, building shared UI libraries, or refactoring prop-heavy components.
react-2026
Provides a comprehensive guide to the modern React 2026 stack. Use when starting a new React project or modernizing an existing one with current frameworks, build tools, routing, state management, or AI integration.
plan
Plan mode: write markdown plan to .hermes/plans/, no exec.
hermes-s6-container-supervision
Modify, debug, or extend the s6-overlay supervision tree inside the Hermes Agent Docker image — adding new services, debugging profile gateways, understanding the Architecture B main-program pattern.