Install Hermes Agent on a Linux VPS: step-by-step setup
Hermes Agent is Nous Research’s open-source self-improving AI agent. This guide walks through installing it on a Linux VPS (Ubuntu, AlmaLinux, or Rocky Linux), including the Docker sandbox that most production setups use and a systemd service so it keeps running after you log out.
Time: about 15 minutes on a fresh VPS.
What you need
- A ColossusCloud Linux VPS with at least 2 GB RAM (cloud model APIs) or 8 GB RAM (if you plan to run Ollama models locally alongside Hermes)
- SSH access with
sudo - An API key for your chosen model provider (OpenRouter, Anthropic, OpenAI, Nous Portal, or others), or Ollama for local models
Supported: Ubuntu 22.04 / 24.04, AlmaLinux 9, Rocky Linux 9. Debian 12 works too.
Step 1: Update your VPS
Ubuntu / Debian
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl git
AlmaLinux / Rocky Linux
sudo dnf update -y
sudo dnf install -y curl git
Step 2: Install Hermes Agent
The installer is a single command and handles dependencies (Python 3.11+, Node.js, and everything else).
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
Reload your shell so the hermes command is on your path:
source ~/.bashrc
Check it installed:
hermes --version
Step 3: Run initial setup
hermes setup
This launches an interactive wizard. You’ll:
- Pick a model provider (Nous Portal, OpenRouter, Anthropic, OpenAI, local Ollama, etc.)
- Enter your API key if you picked a cloud provider
- Choose a default model
- Confirm storage location for skills, memory, and logs (defaults to
~/.hermes)
To switch providers later, use hermes model.
Step 4: Install Docker (recommended for sandboxing)
Hermes Agent can execute code and shell commands on your VPS. For production use, you want those running in a Docker sandbox rather than directly on the host.
Ubuntu / Debian
sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
Log out and back in (or newgrp docker) so your user can run docker without sudo.
AlmaLinux / Rocky Linux
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
Then tell Hermes to use the Docker backend:
hermes config set terminal.backend docker
Step 5: Run Hermes for the first time
hermes
This drops you into the rich TUI. Try a first command:
> what's the current weather in Amsterdam?
Hermes will plan, call its web search tool, and come back with an answer. The interaction is stored in its memory automatically.
Exit the TUI with Ctrl+D or /quit.
Step 6: Set up the messaging gateway (optional)
To reach Hermes from Telegram, Discord, Slack, WhatsApp, or Signal, run the gateway:
hermes gateway
First run walks you through linking each platform. Telegram and Discord are the easiest. You paste a bot token and the agent is reachable from your phone.
Step 7: Run Hermes as a systemd service (persistent)
This is the step most people skip and then wonder why the agent stops responding after they close SSH. Run Hermes as a service so it survives logout and reboots.
Create /etc/systemd/system/hermes.service:
[Unit]
Description=Hermes Agent Gateway
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=YOUR_USERNAME
WorkingDirectory=/home/YOUR_USERNAME
ExecStart=/home/YOUR_USERNAME/.local/bin/hermes gateway
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Replace YOUR_USERNAME with your actual Linux user. Adjust the ExecStart path if Hermes installed somewhere else (check with which hermes).
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable --now hermes
sudo systemctl status hermes
Your agent is now running 24/7, reconnects on crash, and survives reboots.
Step 8: Set up scheduled jobs
Hermes supports natural-language scheduling. Examples:
> hermes cron "every weekday at 8 AM, summarize overnight server logs and send to Telegram"
> hermes cron "every hour, check if https://yoursite.com returns 200 and alert me if not"
> hermes cron "every Friday at 5 PM, list all commits across my Git repos this week"
No crontab syntax needed. Hermes parses the schedule and runs the job unattended.
Step 9: Lock it down
A few sanity-check settings:
- Firewall. Only expose SSH and whatever gateway ports you actually need.
ufw(Ubuntu) orfirewalld(AlmaLinux/Rocky) both work. - Non-root user. Don’t run Hermes as root. Create a normal user, add it to the
dockergroup, and run Hermes as that user. - SSH key only. Disable password SSH in
/etc/ssh/sshd_config. - Review approvals. In the Hermes config, leave command approvals on for sensitive operations rather than auto-approving everything.
Optional: local models with Ollama
If you want to run models locally alongside Hermes, install Ollama on the same VPS:
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.2:3b
Point Hermes at it with hermes model and pick “Ollama” / “OpenAI-compatible endpoint” pointing at http://localhost:11434.
For local models, bump to at least an 8 GB VPS. For larger models (13B, 70B), move up to a bigger plan.
Troubleshooting
hermes: command not found. The installer added binaries to ~/.local/bin. Run source ~/.bashrc or add it to your PATH manually.
Permission denied on Docker. You need to log out and back in after usermod -aG docker. Or use newgrp docker in the current shell.
Gateway disconnects. Make sure you set up systemd (step 7). Running hermes gateway in an SSH session dies when SSH drops.
Out of memory. Hermes plus a local Ollama model eats RAM. Either pick a smaller model or upgrade the VPS.
Deploy a ColossusCloud Linux VPS and get Hermes Agent running in 15 minutes. For the Windows VPS path (via WSL2), see our Windows VPS Hermes Agent guide.