Steps
Prepare your Linux host
On an Uno cloud computer. Create a persistent Linux computer in Uno and open its terminal or SSH session. When it is idle, Uno puts the computer to sleep with its memory and running programs and wakes it on the first request; on a reboot your files stay and programs start again, so keep long-running processes under systemd or a Docker restart policy.
On any Linux server. SSH into any Linux server running systemd with curl, bash, and a non-root user account.
Run the following check on the host to confirm that systemd user services are available before installing Hermes Agent. If you are deciding how to structure a host to run ai agent 24/7, confirm user-session systemd works first.
systemctl --user --version && uname -aInstall Hermes Agent and reload your shell
On the host, run the official installer from the Hermes Agent documentation and reload your shell profile so the
hermesbinary is onPATH. On Linux, Hermes Agent stores its state under~/.hermes.curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash source ~/.bashrc hermes --versionConfigure the model provider and messaging gateway
Run the setup wizard on the host to choose your LLM provider and connect a messaging channel such as Telegram, Discord, or Slack. You can also authenticate via Nous Portal with
hermes setup --portal, or switch providers later withhermes model. Runhermes doctorafterward to verify configuration health.hermes setup hermes gateway setup hermes doctorCreate and enable the lingering user systemd service
On the host, create the user systemd directory, save the unit file below as
~/.config/systemd/user/hermes-gateway.service, then reload systemd, enable the service, and turn on user lingering so the gateway survives SSH logout and starts after a reboot.Save this unit file as ~/.config/systemd/user/hermes-gateway.service. It runs
hermes gatewayin the user systemd manager with WorkingDirectory set to ~/.hermes and restarts automatically on failure. Paired withloginctl enable-linger, the gateway stays running after you disconnect from SSH and restarts after host reboots.[Unit] Description=Hermes Agent Messaging Gateway After=network-online.target Wants=network-online.target [Service] Type=simple WorkingDirectory=%h/.hermes ExecStart=/bin/bash -lc 'exec hermes gateway' Restart=on-failure RestartSec=5 Environment=HOME=%h [Install] WantedBy=default.targetmkdir -p ~/.config/systemd/user # Save the unit file below to ~/.config/systemd/user/hermes-gateway.service systemctl --user daemon-reload systemctl --user enable --now hermes-gateway sudo loginctl enable-linger "$USER"Verify workspace persistence and disconnect from SSH
To verify that files in
~/.hermespersist across disconnects, write a marker file on the host, exit your SSH session back to your laptop, reconnect over SSH, and confirm the service, linger flag, and marker file are intact.# On the host: date -u > ~/.hermes/persistence-check.txt exit # From your laptop, reconnect to the host: ssh user@your-host # On the host after reconnecting: systemctl --user status hermes-gateway --no-pager loginctl show-user "$USER" | grep Linger=yes cat ~/.hermes/persistence-check.txt journalctl --user -u hermes-gateway -n 20 --no-pagerRunning
systemctl --user status hermes-gateway,loginctl show-user "$USER" | grep Linger=yes, andcat ~/.hermes/persistence-check.txtafter reconnecting proves that the user systemd manager stayed alive without an active SSH shell and that~/.hermesretained your test file.Send a message to your configured bot from Telegram, Discord, or Slack while disconnected from any interactive
hermesCLI session, then inspect the service status and logs. The response contains Active: active (running) with linger enabled and Hermes Agent gateway listening for incoming messages.
How requests reach Hermes Agent and persist on disk
An incoming message or webhook enters the Linux host and reaches the hermes-gateway user service managed by systemd. Because the service runs under a lingering user session rather than an interactive shell, closing your laptop or dropping SSH does not terminate the gateway.
When running on Uno, sleep and wake behavior depends on how messages arrive. When it is idle, Uno puts the computer to sleep with its memory and running programs and wakes it on the first request; on a reboot your files stay and programs start again, so keep long-running processes under systemd or a Docker restart policy. Long polling runs inside the computer and cannot wake it. Use an incoming request (such as a webhook) as the wake trigger.
Persistent workspace layout under ~/.hermes
Hermes Agent stores its runtime state inside ~/.hermes on Linux so skills, conversation history, and gateway settings survive service restarts and host reboots. Keeping backups focused on this directory makes it straightforward to preserve learned skills or migrate from another agent using hermes import-agent.
| Path | Stored state | Persistence scope |
|---|---|---|
| ~/.hermes/ | Root Hermes Agent configuration, environment, and gateway settings | Survives SSH disconnects, service restarts, and host reboots |
| ~/.hermes/skills/ | Autonomous and imported skill files (including openclaw-imports) | Retained on disk and reloaded by the agent across sessions |
| ~/.config/systemd/user/hermes-gateway.service | User-level systemd unit definition for the background gateway | Restarts the gateway automatically on failure and after boot when linger is enabled |
Run Hermes Agent on an Uno computer
Launch a persistent Linux computer with NVMe storage and shared vCPU, install Hermes Agent, and keep the gateway under systemd with webhook wake.
Common problems
hermes-gateway stops as soon as the SSH session closes
Run loginctl show-user "$USER" -p Linger.
If the output prints Linger=no, systemd terminates your user manager when the last login shell exits. Run sudo loginctl enable-linger "$USER", then restart the service with systemctl --user restart hermes-gateway so the gateway continues running unattended.
systemctl --user reports Failed to connect to bus
Run echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" && systemctl --user is-system-running.
If XDG_RUNTIME_DIR is empty or you switched accounts with su instead of a full login shell, the user D-Bus socket is unreachable. Log in directly as the target user over SSH (or export XDG_RUNTIME_DIR=/run/user/$(id -u)), then rerun systemctl --user daemon-reload.
hermes-gateway enters a crash loop with command not found
Run journalctl --user -u hermes-gateway -n 30 --no-pager.
If the journal shows hermes: command not found, the non-interactive shell did not load the PATH entry added by install.sh. Confirm the binary location with command -v hermes, verify ExecStart=/bin/bash -lc 'exec hermes gateway' in ~/.config/systemd/user/hermes-gateway.service, or replace hermes with its absolute path before reloading systemd.
Bot does not reply while the Uno computer is asleep
Run hermes doctor.
If hermes doctor passes while you are connected but messages stall after idle periods, the integration is likely using outbound long polling. Long polling runs inside the computer and cannot wake it. Use an incoming request (such as a webhook) as the wake trigger so the first request wakes the computer.
Gateway starts cleanly but refuses to answer messaging commands
Run hermes config get && journalctl --user -u hermes-gateway -n 20 --no-pager.
If the service is active (running) but logs show authentication or provider errors, either the LLM provider credential or the platform bot token is missing or invalid. Re-run hermes model or hermes gateway setup, confirm with hermes doctor, and restart the unit with systemctl --user restart hermes-gateway.