Run Hermes Agent on a VPS

Self-host Hermes on a cheap VPS so it stays online 24/7: install with the one-liner, keep the gateway running with systemd or tmux, and connect Telegram for remote access.

Hermes is a persistent agent with memory across sessions, which makes it a natural fit for a server that never sleeps: scheduled tasks fire on time, Telegram answers at any hour, and long runs are not killed by a closing laptop lid. This guide takes a fresh Linux VPS to an always-on Hermes.

What you need

  • A small VPS. Hermes itself is light; the model is remote, so 1 to 2 GB of RAM is a fine start. (Running a local model on the same box is a different game and needs a GPU; see best models to run with Ollama.)
  • Ubuntu or Debian with Git installed (the installer handles Python, Node, and the rest).
  • A model behind it: an OpenRouter key is the simplest single key. Picks with live prices: best models for Hermes, and best cheap models for Hermes since an always-on agent multiplies token costs. The full math is on what Hermes costs to run.

1. Install

SSH in as a regular user and run the installer:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

It installs the dependency chain (uv, Python 3.11, Node.js, ripgrep, ffmpeg), clones the repo, and sets up the global hermes command in ~/.local/bin, with data in ~/.hermes/. Details in our install guide.

Then configure the model:

hermes setup --portal   # one OAuth covers a model plus the Tool Gateway tools
hermes model            # or bring your own key (OpenRouter recommended)

2. Connect Telegram first

On a headless server, Telegram is your main interface to the agent, so wire it before anything else:

hermes gateway setup

The wizard asks for a BotFather token and your allowed user IDs; the full walkthrough (including group chats and voice) is in Hermes Telegram setup.

3. Keep the gateway running

The gateway process (hermes gateway) is what keeps Telegram connected. On a server you want it supervised, not running in a forgotten SSH session. The quick option is tmux:

tmux new -s hermes
hermes gateway
# detach with Ctrl+B then D

The robust option is a systemd user unit, which restarts the gateway on failure and starts it on boot. Create ~/.config/systemd/user/hermes-gateway.service:

[Unit]
Description=Hermes Agent gateway
After=network-online.target

[Service]
ExecStart=%h/.local/bin/hermes gateway
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target

Then enable it and let it survive logout:

systemctl --user daemon-reload
systemctl --user enable --now hermes-gateway
loginctl enable-linger $USER

Adapt the ExecStart path if your install put hermes somewhere else (which hermes tells you). Check logs with journalctl --user -u hermes-gateway -f.

4. Server hygiene

  • Keep ~/.hermes/ private (mode 700): it holds your config, memory, and API keys.
  • Allowlist only your own Telegram user ID; that is the gate between the internet and an agent with shell access.
  • Watch spend for the first week. An always-on agent is exactly where a cheap default model pays off; the scenario table on the cost page shows the difference per model.
  • Update by re-running the installer or pulling the repo, then restart the gateway unit.

Why not just run it at home?

You can, and for privacy-sensitive workloads you should consider it; Hermes is local-first by design. The VPS trade is uptime and a clean network position in exchange for trusting a host with your agent's data. If that trade bothers you, a small always-on box at home (even a mini PC) runs Hermes just as well.

Source: Hermes Agent installation docs, checked June 2026. The systemd unit is a standard template; adapt paths to your install.

Share: