Deploy Hermes Agent, Nous Research's open-source self-improving AI agent, on Ubuntu in under 15 minutes. Hermes connects to Telegram, Discord, Slack, WhatsApp, Signal, and email with persistent memory, reusable skills, and cron automation.
Note: This article was written and tested by actually deploying Hermes Agent on a BinaryLane VPS end-to-end - installer, configuration, and the gateway service were all verified live. All commands and steps have been reviewed against the current Hermes Agent CLI and documentation as of August 2026.
⚠️ Unsupported Software: Hermes Agent is third-party software developed by Nous Research, not developed or maintained by BinaryLane. While we provide this guide to help you get started, BinaryLane Support cannot assist with Hermes configuration, troubleshooting, or usage. For Hermes-specific help, please refer to the Hermes Agent Documentation or GitHub repository.
TABLE OF CONTENTS
- What is Hermes Agent?
- Security Considerations
- Prerequisites
- Deployment Methods
- Configuration
- Managing Your Installation
- Security & Sandboxing
- Troubleshooting
- Additional Resources
What is Hermes Agent?
Hermes Agent is an open-source, self-improving AI agent from Nous Research that runs on your own server. It provides:
- Persistent memory - remembers your preferences, projects, and environment across sessions
- Self-improving skills - autonomously creates and refines reusable skills after complex tasks
- Multi-platform support - Telegram, Discord, Slack, WhatsApp, Signal, email, and CLI through a single gateway process
- Provider flexibility - switch between Anthropic, OpenAI, Google, OpenRouter, Nous Portal (300+ models), or a custom endpoint without code changes
- Cron & automation - schedule recurring agent tasks
Licensed under MIT. Official repository: github.com/nousresearch/hermes-agent.
Hermes Desktop: Nous Research also ships a native desktop app for macOS, Windows, and Linux, for anyone who'd rather run Hermes locally instead of self-hosting it on a VPS. Download it from hermes-agent.nousresearch.com - or, if the CLI is already installed, just run hermes desktop.
Security Considerations
⚠️ Important: By default Hermes runs its terminal/file tools directly on the host (terminal.backend: localinconfig.yaml) - it has full system access, the same as OpenClaw or any other host-mode agent. Treat this server as a high-value target.
Recommended security measures for a public-facing Hermes host:
- Sandbox the agent: Set
terminal.backendtodockerorsshin~/.hermes/config.yamlto run tool calls inside an isolated container/remote host instead of directly on the VPS. Optionally enable the egress credential-injection proxy (hermes egress setup && hermes egress start) so a sandboxed agent never sees your real API keys. - SSH: Use key-based authentication only (Ed25519 or RSA 4096-bit), disable root login
- External Firewall: If you're connecting from a static IP address, use the External Firewall to whitelist only your IP address for SSH (port 22)
- Secrets: API keys live in
~/.hermes/.env- store a backup in a password vault, never in version control - Network: Consider deploying inside a VPC, or use a VPN/WireGuard for additional access control
- Updates: Keep the system patched and consider
unattended-upgrades+fail2ban
Harden the server: Don't stop at the steps above - see Securing Your Servers for general BinaryLane hardening guidance. You could also consider deploying on a CIS Hardened Image instead of stock Ubuntu for a pre-hardened baseline.
Prerequisites
⭐ = Recommended
| Requirement | Details |
|---|---|
| BinaryLane Account | Sign up at home.binarylane.com.au |
| Recommended VPS Specifications | 1 vCPU, 2GB RAM (std-1vcpu) ⭐ - verified sufficient (gateway idles around 100–150MB RAM; installer itself needs ~6GB disk for Python/Node/Playwright Chromium) |
| Operating System | Ubuntu 24.04 LTS ⭐ |
| AI Provider API Key | Anthropic, OpenAI, Google, OpenRouter, or Nous Portal - must support at least 64,000 tokens of context (Hermes rejects smaller-context models at startup) |
Deployment Methods
Method 1: BinaryLane CLI (Recommended)
The fastest way to deploy Hermes - using the BinaryLane CLI with cloud-init to automatically install Hermes on first boot.
Step 1: Install the BinaryLane CLI
pip install binarylane-cliStep 2: Configure Authentication
Create an API token from the BinaryLane Dashboard → Developer API → Create Token, then:
bl configureVerify with bl account get
Step 3: Get Your SSH Key ID
bl ssh-key listIf you don't have one registered:
bl ssh-key create --name "My Key" --public-key "ssh-rsa AAAA..."Step 4: Create the Cloud-Init Script
Save this as hermes-init.yaml:
#cloud-config
package_update: true
package_upgrade: true
runcmd:
# Disable interactive prompts
- export DEBIAN_FRONTEND=noninteractive
# Refresh package lists first - without this, the Hermes
# installer's ripgrep/ffmpeg step silently fails on a fresh image
- apt-get update
# Install Hermes Agent (installer handles Python, Node, uv, etc.)
- curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bashThis installs Hermes and all its dependencies automatically on first boot (typically 5–8 minutes, depending on package mirrors - most of that time is downloading the bundled Playwright Chromium browser for web tools).
Step 5: Deploy the Server
bl server create \
--name hermes \
--region syd \
--image ubuntu-24.04 \
--size std-1vcpu \
--ssh-keys YOUR_SSH_KEY_ID \
--user-data "$(cat hermes-init.yaml)"Step 6: Get Your Server IP
bl server listWait for status to show active. Cloud-init will run automatically on first boot.
Step 7: Configure and Start the Gateway
SSH in and configure your AI provider (avoid pasting a real API key into cloud-init - do this step interactively instead):
ssh root@YOUR_SERVER_IP
hermes setupOr configure non-interactively:
hermes config set model anthropic/claude-sonnet-5
hermes config set ANTHROPIC_API_KEY your-api-key-hereThen install and start the gateway as a persistent service:
hermes gateway setup # interactive: connect Telegram/Discord/Slack/etc.
hermes gateway install # creates + enables a systemd --user serviceVerified:hermes gateway installautomatically runsloginctl enable-lingerfor you, so the gateway keeps running after you log out of SSH - no extra steps needed.
Tip: If cloud-init is still running, check progress with: tail -f /var/log/cloud-init-output.logAvailable Regions
| Slug | Location |
|---|---|
syd | Sydney |
mel | Melbourne |
bne | Brisbane |
per | Perth |
adl | Adelaide |
sin | Singapore |
Available Sizes
⭐ = Recommended
| Slug | vCPUs | Memory | Disk | Price/Month* |
|---|---|---|---|---|
std-min | 1 | 1 GB | 20 GB | $4.90 |
std-1vcpu ⭐ | 1 | 2 GB | 40 GB | $9.80 |
std-2vcpu | 2 | 4 GB | 60 GB | $19.60 |
std-4vcpu | 4 | 8 GB | 100 GB | $39.20 |
*Pricing as of August 2026, subject to change
If you find the performance insufficient for your use case (e.g. running the Docker sandbox backend, or several concurrent sessions), you can upgrade your server via the Change Plan page in the BinaryLane Dashboard at any time, subject to resource availability.
Method 2: BinaryLane API
Deploy directly via the REST API with the same cloud-init script for automatic installation.
Get Your SSH Key ID
curl -s --request GET \
'https://api.binarylane.com.au/v2/account/keys' \
--header 'Authorization: Bearer YOUR_API_TOKEN'Create Server with Cloud-Init
curl --request POST \
'https://api.binarylane.com.au/v2/servers' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "hermes",
"region": "syd",
"image": "ubuntu-24.04",
"size": "std-1vcpu",
"ssh_keys": [YOUR_SSH_KEY_ID],
"user_data": "#cloud-config\npackage_update: true\npackage_upgrade: true\n\nruncmd:\n - export DEBIAN_FRONTEND=noninteractive\n - apt-get update\n - curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash"
}'Once the server is active, SSH in and run hermes setup (or hermes config set ...) followed by hermes gateway setup && hermes gateway install to complete setup.
Get Server IP
curl -s --request GET \
'https://api.binarylane.com.au/v2/servers' \
--header 'Authorization: Bearer YOUR_API_TOKEN'Full API Reference: api.binarylane.com.au/reference
Method 3: Manual Installation
For users who prefer step-by-step control or are installing on an existing server.
Create a VPS via the BinaryLane Dashboard with Ubuntu 24.04 LTS.
SSH into your server:
ssh root@YOUR_SERVER_IPUpdate system packages:
apt update && apt upgrade -yDon't skip this step - on a fresh image the Hermes installer's automatic
ripgrep/ffmpeginstall silently fails without a priorapt update(it falls back to a slower grep-based search and disables TTS voice messages).Install Hermes Agent:
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bashThe installer handles Python 3.11, Node.js 22, uv, ripgrep, ffmpeg, and Playwright's bundled Chromium automatically. On a
std-1vcpuserver this takes 5–8 minutes and uses about 6GB of disk.Run the setup wizard:
hermes setupConnect messaging platforms and install the gateway service:
hermes gateway setup hermes gateway install
Configuration
AI Provider Setup
Hermes ships with anthropic/claude-opus-4.6 configured against an OpenRouter base URL by default - you'll need to set your own model and credentials. Supported providers include:
| Provider | Example Model String | Get API Key |
|---|---|---|
| Anthropic | anthropic/claude-sonnet-5 | console.anthropic.com |
| OpenRouter | google/gemini-3-flash, etc. | openrouter.ai |
| Nous Portal | 300+ models via OAuth | hermes setup --portal |
| OpenAI | Native model IDs (ChatGPT OAuth) | platform.openai.com |
| Google AI Studio | Native Gemini IDs | aistudio.google.com |
⚠️ Minimum context requirement: Hermes requires a model with at least 64,000 tokens of context. Smaller-context models are rejected at startup - they can't hold enough working memory for multi-step tool calling.
To set your model and key non-interactively (verified working):
hermes config set model anthropic/claude-sonnet-5
hermes config set ANTHROPIC_API_KEY your-api-key-hereNon-secret settings go to ~/.hermes/config.yaml; secrets go to ~/.hermes/.env automatically.
Connecting Messaging Platforms
hermes gateway setupThis interactive wizard walks you through connecting Telegram, Discord, Slack, WhatsApp, Signal, email, Home Assistant, or Teams - one gateway process serves all connected platforms.
Fail-closed by default: until you configure a platform allowlist (e.g.TELEGRAM_ALLOWED_USERS=your_id) or setGATEWAY_ALLOW_ALL_USERS=true, the gateway denies messages from unrecognized senders on every connected platform.
Managing Your Installation
Note: The gateway runs as a systemd --user service.hermes gateway installautomatically enables systemd lingering, so it keeps running after your SSH session ends - no manualloginctlstep required.
Check Status:
hermes gateway status
hermes doctorService Commands:
# Check service status
systemctl --user status hermes-gateway
# View live logs
journalctl --user -u hermes-gateway -f
# Restart the gateway (also refreshes an outdated unit file)
hermes gateway restart
# Stop / start
hermes gateway stop
hermes gateway startUpdate Hermes:
hermes updateThis pulls the latest code, re-installs dependencies, migrates your config, and restarts the gateway automatically. Preview what would change first with hermes update --check.
Test the Agent:
hermesStarts an interactive chat session in the terminal. Use hermes --continue (or -c) to resume your last session.
Security & Sandboxing
Unlike some self-hosted AI gateways, a fresh Hermes install does not open any network port - the gateway only makes outbound connections to messaging platform APIs. There's no local dashboard or API port to lock behind a reverse proxy.
The main exposure to manage instead is the agent's own system access. By default, tool calls (shell, file operations) run directly on the host. To sandbox them:
# In ~/.hermes/config.yaml
terminal:
backend: "docker" # or "ssh" to run tools on a separate remote hostFor further isolation, the egress credential-injection proxy keeps your real API keys off the sandbox entirely - the sandbox only sees opaque proxy tokens:
hermes egress setup
hermes egress start
Troubleshooting
| Issue | Solution |
|---|---|
| ripgrep/ffmpeg not installed after setup | Run apt-get update && apt-get install -y ripgrep ffmpeg - the installer's own attempt fails silently on a fresh image without a prior apt update |
| Gateway won't start | Check logs: journalctl --user -u hermes-gateway -n 100 --no-pager, then hermes doctor |
| Model rejected at startup | Your configured model has less than 64,000 tokens of context - choose a larger-context model |
| AI not responding / auth errors | Verify API key is set: hermes doctor. Re-run hermes setup or hermes config set |
| Messages being ignored | Check the allowlist - Hermes denies unrecognized senders by default (see Configuration above) |
hermes not found | Re-open your shell, or run export PATH="/usr/local/bin:$PATH" |
| Cloud-init failed | Check logs: cat /var/log/cloud-init-output.log |
Additional Resources
- Hermes Agent Documentation
- Hermes Agent GitHub Repository
- BinaryLane CLI Documentation
- BinaryLane API Reference
If you require assistance with BinaryLane services, feel free to submit a support ticket at our helpdesk here: Submit a ticket | BinaryLane
