← All Guides

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 status

After install the service is enabled at boot. You can close the terminal and your agent keeps answering messages.

Full Subcommand Reference

CommandWhat it does
hermes gateway installInstall the gateway as a systemd/launchd background service
hermes gateway uninstallRemove the gateway service
hermes gateway startStart the installed background service
hermes gateway stopStop the service
hermes gateway restartRestart the service
hermes gateway statusShow gateway status
hermes gateway runRun in the foreground — no service installed
hermes gateway listList all profiles and their gateway status
hermes gateway setupConfigure messaging platforms
hermes gateway migrate-legacyRemove legacy hermes.service units from pre-rename installs
hermes gateway enrollEnroll 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 run

In 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 -f

macOS (launchd)

hermes gateway status
launchctl list | grep hermes

Upgrading 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-legacy

Check 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 loaded

Run 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 uninstall

This 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.

Never Configure systemd Again

Managed Hermes Agent with supervision and restarts built in, from $3/mo.

Deploy Now