Skip to content

How to Self-Host Hermes AI Agent on VPS or NUC

Server Hardware

The Problem

I wanted to run Hermes AI agent continuously without relying on my laptop. Hermes is a self-improving agent that builds skills from experience and maintains memory across sessions. But it needs to be always-on to actually work as my AI companion.

The options were:

Self-Hosting Options
1. Cloud VPS - $5-40/month, remote, already configured
2. Intel NUC - $200-400 one-time, home server, full control
3. Raspberry Pi - Cheaper but limited RAM/CPU

I tried both VPS and NUC. Here’s what I learned about hardware requirements, setup, and cost trade-offs.

Hardware Requirements

Hermes documentation says it can “run on a $5 VPS.” My testing confirmed this:

Hardware Requirements Tested
┌─────────────┬─────────────┬───────────────┬────────────────────────────────┐
│ Component │ Minimum │ Recommended │ Notes │
├─────────────┼─────────────┼───────────────┼────────────────────────────────┤
│ RAM │ 4GB │ 8-16GB │ More RAM = larger context │
│ CPU │ 2 vCPU │ 4-8 vCPU │ Multi-core helps parallel tasks│
│ Storage │ 10GB │ 50GB+ │ For models, logs, memory DB │
│ Network │ Broadband │ Stable always │ Home servers need UPS backup │
└─────────────┴─────────────┴───────────────┴────────────────────────────────┘

My actual setups:

VPS Setup (tested on DigitalOcean):

  • 4GB RAM / 2 vCPU: Works but slow with larger contexts
  • 8GB RAM / 4 vCPU: Comfortable for daily use
  • 16GB RAM / 8 vCPU: Handles complex multi-agent tasks

NUC Setup (Intel NUC 12 Pro):

  • 16GB RAM, i5 processor, 256GB NVMe
  • Runs Hermes + Ollama with llama3 locally
  • Consumes ~15W idle, always-on

Setup Steps

Step 1: Install Hermes

The one-line installer works on Linux and macOS:

install-hermes.sh
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
# After installation, reload shell
source ~/.bashrc # or source ~/.zshrc
# Start Hermes
hermes

The installer handles platform-specific setup automatically. On Ubuntu Server, this took about 2 minutes.

Step 2: Configure Model Provider

Hermes supports multiple providers. I configured OpenRouter as primary with budget pricing:

configure-provider.sh
# Run the setup wizard
hermes setup
# Or configure manually
hermes model
# Choose: openrouter
# Select model: openrouter:auto (auto-selects cheapest capable model)

Budget API options worth considering:

Budget API Providers
┌─────────────────────┬─────────────────────┬───────────────────────────────┐
│ Provider │ Cost │ Notes │
├─────────────────────┼─────────────────────┼───────────────────────────────┤
│ Nous Portal │ Subscription │ Built-in, no extra config │
│ OpenRouter │ Pay per use │ 200+ models, auto routing │
│ MiniMax │ Budget rates │ Good for long conversations │
│ z.ai/GLM │ Free tier available │ Chinese provider │
│ Kimi/Moonshot │ Competitive │ Good for research tasks │
└─────────────────────┴─────────────────────┴───────────────────────────────┘

Step 3: Add Local Model with Ollama (Optional)

For zero-cost inference after hardware purchase, I added Ollama:

install-ollama.sh
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull a model (llama3 works well on CPU)
ollama pull llama3
# Configure Hermes to use Ollama via MCP
# Hermes supports MCP server integration

The trade-off: CPU-based Ollama is slower than cloud APIs. llama3.2 on my NUC takes ~3-5 seconds per response versus ~1 second on OpenRouter. But it’s free and private.

Step 4: Enable Remote Access (Gateway)

The key advantage of self-hosting is accessing Hermes from anywhere. I set up the messaging gateway:

setup-gateway.sh
# Configure Telegram bot (or Discord, Slack, WhatsApp)
hermes gateway setup
# Start the gateway
hermes gateway start
# Hermes now responds from Telegram while running on VPS

Hermes supports Telegram, Discord, Slack, WhatsApp, Signal, and Email. I use Telegram for personal use and Slack for work projects.

Step 5: Set Up Always-On

For VPS, Hermes runs as a normal process. I created a systemd service:

hermes-systemd.sh
# Create systemd service file
sudo tee /etc/systemd/system/hermes.service << 'EOF'
[Unit]
Description=Hermes AI Agent
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/.local/bin/hermes gateway start
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Enable and start
sudo systemctl daemon-reload
sudo systemctl enable hermes
sudo systemctl start hermes

For NUC at home, I added UPS backup for power outage protection:

Home Server Reliability Checklist
[ ] UPS battery backup (min 30 min runtime)
[ ] Automatic restart on power restore
[ ] Network monitoring (ping gateway every 30s)
[ ] Backup internet (mobile hotspot as fallback)

Cost Comparison

After running both setups for a month, here’s my actual cost breakdown:

Monthly Cost Comparison
┌───────────────────────────┬─────────────────────┬───────────────────────────┐
│ Approach │ Monthly Cost │ Trade-offs │
├───────────────────────────┼─────────────────────┼───────────────────────────┤
│ VPS + OpenRouter API │ $6 VPS + ~$15 API │ Remote, convenient │
│ VPS + budget API (MiniMax)│ $6 VPS + ~$5 API │ Slower but cheaper │
│ NUC + Ollama only │ $0 (after hardware) │ Free but slower inference │
│ NUC + OpenRouter fallback │ $0 + ~$10 API │ Hybrid, best balance │
└───────────────────────────┴─────────────────────┴───────────────────────────┘

My NUC cost $350. Amortized over 3 years: ~$10/month. Adding OpenRouter for complex tasks: ~$10/month additional. Total: ~$20/month for hybrid setup.

The VPS route would be $6 + $15 = $21/month. Nearly identical cost but without hardware ownership.

What I Got Wrong

Mistake 1: Underestimating RAM

I started with a $5 VPS (1GB RAM). Hermes installed but crashed on larger contexts. The documentation says “run on a $5 VPS” but that’s the bare minimum. 8GB RAM is realistic for daily use.

Mistake 2: No Backup Internet for Home Server

My NUC went offline during a 2-hour ISP outage. Hermes wasn’t available. I now keep a mobile hotspot configured as failover.

Mistake 3: Ignoring Context Limits

Hermes builds memory across sessions. After a week of heavy use, my memory database was 500MB. Without periodic compression, responses slowed. I added a weekly cron job:

memory-compress.sh
# Add to crontab: crontab -e
# Weekly memory compression
0 3 * * 0 hermes insights --compress --days 7

Mistake 4: Not Using Modal for Serverless

Hermes supports Modal backend for serverless persistence. Environment hibernates when idle, costs nearly nothing between sessions. I should have tried this before buying NUC:

modal-backend.sh
# Configure Modal backend
hermes config set terminal_backend modal
# Modal hibernates when idle, wakes on demand
# Perfect for intermittent use

Why Self-Host vs Cloud Subscription

The key advantages I found:

Self-Hosting Advantages
+ Privacy: My conversations stay on my hardware
+ Control: I choose models, configure tools, set limits
+ Continuity: Agent runs 24/7, builds deeper user model
+ Cost: After hardware purchase, marginal cost is $0-10/month
+ Skills: Agent learns my specific workflows over time

The disadvantages:

Self-Hosting Disadvantages
- Setup complexity: Requires technical knowledge
- Maintenance: Updates, backups, monitoring
- Reliability: Home servers need UPS, backup internet
- Speed: Local Ollama slower than cloud APIs

The Architecture

Understanding Hermes architecture helped me debug issues:

Hermes Architecture
┌─────────────────────────────────────────────────────────────────────────────┐
│ Hermes Agent │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ CLI/TUI │ │ Gateway │ │ Memory │ │ Skills │ │
│ │ │ │ (Telegram/ │ │ (SQLite │ │ System │ │
│ │ Multiline │ │ Discord/ │ │ + FTS5) │ │ │ │
│ │ Editor) │ │ Slack) │ │ │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │ │
│ └──────────────────┴──────────────────┴──────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ Agent Loop │ │
│ │ (Planning + │ │
│ │ Execution) │ │
│ └─────────────────┘ │
│ │ │
│ ▼ │
│ ┌───────────────────────────────────────────────────────┐ │
│ │ LLM Providers │ │
│ ├───────────┬───────────┬───────────┬───────────┬───────┤ │
│ │ Nous │ OpenRouter│ MiniMax │ Ollama │ ... │ │
│ │ Portal │ │ │ (local) │ │ │
│ └───────────┴───────────┴───────────┴───────────┴───────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘

The memory system uses SQLite with FTS5 for full-text search. This is why storage matters - after months of use, the memory database grows.

My Current Setup

I settled on a hybrid approach:

My Production Setup
NUC (home): Hermes + Ollama (llama3.2)
- Always-on gateway (Telegram)
- Local fallback for simple tasks
- Memory persistence across sessions
OpenRouter (cloud): Complex tasks requiring larger models
- Hermes automatically routes complex queries
- Budget tier keeps costs low

This gives me privacy for most conversations while still having cloud capability for hard problems.

Summary

Self-hosting Hermes AI agent works on modest hardware. 8GB RAM VPS or Intel NUC with Ubuntu is sufficient. The setup takes 10 minutes with the one-line installer.

The real value is having an always-on agent that:

  • Learns my workflows through skills system
  • Maintains memory across sessions
  • Responds from Telegram while running on my server
  • Costs $0-20/month after initial setup

Choose VPS for convenience, NUC for control and long-term savings. Add UPS and backup internet for home servers. Consider Modal backend for intermittent use patterns.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments