Skip to content

Deploy on VPS ($5/mo)

Hermes Agent can run comfortably on a $5/month VPS, making it accessible for personal use, small teams, and experimentation.

Provider$5 Plan SpecsLocationsNotes
DigitalOcean1 vCPU, 1GB RAM, 25GB SSDGlobalReliable, good docs
Linode1 vCPU, 1GB RAM, 25GB SSDGlobalGood support
Vultr1 vCPU, 1GB RAM, 25GB SSDGlobalFast provisioning
Hetzner2 vCPU, 4GB RAM, 40GB SSDEUBest value
Racknerd1 vCPU, 1GB RAM, 20GB SSDUSVery cheap
  1. Sign up with your chosen provider
  2. Create a new instance with:
    • OS: Ubuntu 22.04 LTS
    • Plan: $5/month tier
    • Region: Closest to you or your users
    • SSH Key: Add your public key for secure access
Terminal window
# SSH into your server
ssh root@<your-server-ip>
# Create a non-root user (recommended)
adduser hermes
usermod -aG sudo hermes
# Switch to new user
su - hermes
# Update system
sudo apt update && sudo apt upgrade -y
Terminal window
# Install required packages
sudo apt install -y curl git python3 python3-pip python3-venv build-essential
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
Terminal window
# Run the official installer
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
# Reload shell configuration
source ~/.bashrc
Terminal window
# Set up your configuration
hermes setup
# Or manually create config
mkdir -p ~/.hermes
nano ~/.hermes/config.yaml

Example minimal configuration:

model:
provider: openrouter
model: anthropic/claude-3.5-sonnet
api_key: ${OPENROUTER_API_KEY}
messaging:
telegram:
enabled: true
bot_token: ${TELEGRAM_BOT_TOKEN}
Terminal window
# Test in foreground
hermes chat
# Or start gateway for messaging platforms
hermes gateway

With only 1GB RAM, you’ll need to optimize:

Terminal window
# Create 2GB swap file
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# Make permanent
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
# Verify
free -h
~/.hermes/config.yaml
model:
# Use smaller context to save memory
max_tokens: 1500
memory:
# Reduce memory limits
memory_char_limit: 1500
user_char_limit: 800
terminal:
# Shorter timeout
timeout: 60
Terminal window
# Reduce swappiness (use RAM before swap)
sudo sysctl vm.swappiness=10
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
# Disable unnecessary services
sudo systemctl disable snapd
sudo systemctl disable man-db

Create a systemd service for automatic startup:

Terminal window
# Create service file
sudo nano /etc/systemd/system/hermes-gateway.service

Add:

[Unit]
Description=Hermes Agent Gateway
After=network.target
[Service]
Type=simple
User=hermes
WorkingDirectory=/home/hermes
Environment=HOME=/home/hermes
Environment=PATH=/home/hermes/.local/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=/home/hermes/.local/bin/hermes gateway
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target

Enable and start:

Terminal window
sudo systemctl daemon-reload
sudo systemctl enable hermes-gateway
sudo systemctl start hermes-gateway
# Check status
sudo systemctl status hermes-gateway
# View logs
sudo journalctl -u hermes-gateway -f
Terminal window
sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow 22/tcp # SSH
sudo ufw allow 80/tcp # HTTP (if needed)
sudo ufw allow 443/tcp # HTTPS (if needed)
sudo ufw enable
Terminal window
sudo nano /etc/ssh/sshd_config
# Set these options:
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
# Restart SSH
sudo systemctl restart sshd
Terminal window
sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades
Terminal window
sudo apt install fail2ban
sudo systemctl enable fail2ban
sudo systemctl start fail2ban
# Create monitoring script
cat > ~/monitor.sh << 'EOF'
#!/bin/bash
CPU=$(top -bn1 | grep "Cpu(s)" | awk '{print $2}' | cut -d'%' -f1)
MEM=$(free | grep Mem | awk '{printf "%.0f", $3/$2 * 100.0}')
DISK=$(df / | tail -1 | awk '{print $5}' | tr -d '%')
echo "$(date): CPU ${CPU}% | Memory ${MEM}% | Disk ${DISK}%"
if (( $(echo "$CPU > 90" | bc -l) )); then
echo "High CPU usage detected!"
fi
if (( $MEM > 90 )); then
echo "High memory usage detected!"
fi
EOF
chmod +x ~/monitor.sh
# Run manually or add to cron
~/monitor.sh

Use free tiers of monitoring services:

  • UptimeRobot: 50 monitors free (HTTP ping every 5 minutes)
  • Pingdom: 1 monitor free
  • StatusCake: 10 tests free
# Create backup script
cat > ~/backup.sh << 'EOF'
#!/bin/bash
BACKUP_DIR="$HOME/backups"
DATE=$(date +%Y%m%d)
mkdir -p $BACKUP_DIR
# Backup Hermes config
tar czf $BACKUP_DIR/hermes-$DATE.tar.gz ~/.hermes/
# Keep only last 7 days
find $BACKUP_DIR -name "hermes-*.tar.gz" -mtime +7 -delete
echo "Backup completed: $BACKUP_DIR/hermes-$DATE.tar.gz"
EOF
chmod +x ~/backup.sh
# Add to cron (daily at 2 AM)
(crontab -l 2>/dev/null; echo "0 2 * * * $HOME/backup.sh") | crontab -

Sync to free cloud storage:

Terminal window
# Install rclone
sudo apt install rclone
# Configure (follow prompts)
rclone config
# Add to backup script
rclone sync ~/backups remote:hermes-backups
  • Slow response times
  • “Out of memory” errors
  • System freezes
  • Killed processes (OOM killer)
Terminal window
# Check memory usage
free -h
ps aux --sort=-%mem | head -20
# Check swap usage
swapon --show
# Clear caches (temporary relief)
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches
# Find memory leaks
sudo apt install smem
smem -p

If 1GB is insufficient:

  1. Add swap (already done above)
  2. Upgrade VPS to next tier (~$10/month for 2GB)
  3. Use lighter models (smaller context, faster models)
  4. Limit concurrent tasks in Hermes config
ProviderMonthly CostSpecsBest For
Hetzner€4.512 vCPU, 4GB RAMBest value
DigitalOcean$61 vCPU, 1GB RAMReliability
Linode$51 vCPU, 1GB RAMSupport
Vultr$51 vCPU, 1GB RAMSpeed
Oracle CloudFree2 vCPU, 1GB RAMBudget (complex setup)

A $5 VPS is perfectly capable of running Hermes Agent for personal use or small teams. With proper optimization, you can get excellent performance. As your needs grow, you can easily upgrade to a larger instance.

For the best experience on a budget, we recommend Hetzner Cloud for their 2 vCPU/4GB RAM offering at ~€4.51/month.