Command Reference
Run Hermes Agent as a Background Service
If you came here searching for hermes --install-daemon, that flag does not exist. Hermes Agent installs its background service through the gateway command instead. This page covers the real syntax, the two platforms where you should deliberately not install a service, and how to remove it cleanly.
Short answer: run hermes gateway install. It registers the Hermes messaging gateway as a systemd service on Linux or a launchd agent on macOS, so it starts at boot and keeps running after you close the terminal. Check it with hermes gateway status and remove it with hermes gateway uninstall.
Why “install-daemon” Finds Nothing
OpenClaw exposes a openclaw onboard --install-daemon flag, and people reasonably assume Hermes Agent mirrors it. It does not. Hermes groups every service-lifecycle action under hermes gateway, because the thing being supervised is the messaging gateway — the process that holds your Telegram, Discord, WhatsApp and Weixin connections open.
There is no hermes daemon, no hermes service, and no --install-daemon flag anywhere in the CLI.
The Command
# Install the gateway as a systemd (Linux) or launchd (macOS) service
hermes gateway install
# Confirm it registered and is running
hermes gateway statusAfter install the service is enabled at boot. You can close the terminal and your agent keeps answering messages.
Full Subcommand Reference
| Command | What it does |
|---|---|
hermes gateway install | Install the gateway as a systemd/launchd background service |
hermes gateway uninstall | Remove the gateway service |
hermes gateway start | Start the installed background service |
hermes gateway stop | Stop the service |
hermes gateway restart | Restart the service |
hermes gateway status | Show gateway status |
hermes gateway run | Run in the foreground — no service installed |
hermes gateway list | List all profiles and their gateway status |
hermes gateway setup | Configure messaging platforms |
hermes gateway migrate-legacy | Remove legacy hermes.service units from pre-rename installs |
hermes gateway enroll | Enroll the gateway with a relay connector |
Verified against the Hermes Agent build shipped in our fleet image (v2026.7.20).
Where You Should NOT Install the Service
Hermes explicitly recommends foreground mode on three platforms, because there is no user-level init system for the service to attach to:
- WSL — see the Hermes on WSL guide
- Docker — the container runtime is already your supervisor
- Termux (Android)
On those, run the gateway in the foreground and let the outer supervisor own restarts:
hermes gateway runIn Docker specifically, installing a systemd service inside the container fights the container lifecycle. Use restart: unless-stopped in your docker-compose file instead.
Verifying the Service
Linux (systemd)
# Hermes' own view
hermes gateway status
# The underlying unit
systemctl --user status hermes-gateway
# Follow logs
journalctl --user -u hermes-gateway -fmacOS (launchd)
hermes gateway status
launchctl list | grep hermesUpgrading From a Pre-Rename Install
The current unit is hermes-gateway.service. Older builds installed one named hermes.service. If you upgraded across that rename, both units can end up enabled — and because they use the same bot token, they SIGTERM-fight each other in roughly a 30-second flap loop. The visible symptoms are a gateway that appears to restart itself every half minute, dropped messages, and duplicate replies.
hermes gateway migrate-legacyCheck for the conflict directly with:
systemctl --user list-units 'hermes*'
# Healthy: only hermes-gateway.service (plus per-profile units
# such as hermes-gateway-coder.service if you run named profiles)
# Broken: hermes.service AND hermes-gateway.service both loadedRun the migration before opening a bug report about a gateway that “restarts itself” — two competing units is the usual cause.
Uninstalling
# Remove the service, keep config and chat history
hermes gateway uninstallThis removes only the service registration. Your profile, credentials, and chat history under ~/.hermes are untouched.
Skip the Service Setup Entirely
OpenClaw Launch runs Hermes Agent as a supervised container with restart policies, health checks, and log retention already configured — there is no init system for you to manage. See also the best Hermes hosting comparison and Hermes system requirements.