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.
Recommended VPS Providers
Section titled “Recommended VPS Providers”| Provider | $5 Plan Specs | Locations | Notes |
|---|---|---|---|
| DigitalOcean | 1 vCPU, 1GB RAM, 25GB SSD | Global | Reliable, good docs |
| Linode | 1 vCPU, 1GB RAM, 25GB SSD | Global | Good support |
| Vultr | 1 vCPU, 1GB RAM, 25GB SSD | Global | Fast provisioning |
| Hetzner | 2 vCPU, 4GB RAM, 40GB SSD | EU | Best value |
| Racknerd | 1 vCPU, 1GB RAM, 20GB SSD | US | Very cheap |
Quick Setup Guide
Section titled “Quick Setup Guide”1. Create Your VPS
Section titled “1. Create Your VPS”- Sign up with your chosen provider
- 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
2. Initial Server Setup
Section titled “2. Initial Server Setup”# SSH into your serverssh root@<your-server-ip>
# Create a non-root user (recommended)adduser hermesusermod -aG sudo hermes
# Switch to new usersu - hermes
# Update systemsudo apt update && sudo apt upgrade -y3. Install Dependencies
Section titled “3. Install Dependencies”# Install required packagessudo 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 | shsource $HOME/.local/bin/env4. Install Hermes Agent
Section titled “4. Install Hermes Agent”# Run the official installercurl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
# Reload shell configurationsource ~/.bashrc5. Configure Hermes
Section titled “5. Configure Hermes”# Set up your configurationhermes setup
# Or manually create configmkdir -p ~/.hermesnano ~/.hermes/config.yamlExample 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}6. Run Hermes
Section titled “6. Run Hermes”# Test in foregroundhermes chat
# Or start gateway for messaging platformshermes gatewayOptimizing for 1GB RAM
Section titled “Optimizing for 1GB RAM”With only 1GB RAM, you’ll need to optimize:
Enable Swap
Section titled “Enable Swap”# Create 2GB swap filesudo fallocate -l 2G /swapfilesudo chmod 600 /swapfilesudo mkswap /swapfilesudo swapon /swapfile
# Make permanentecho '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
# Verifyfree -hOptimize Hermes Configuration
Section titled “Optimize Hermes Configuration”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: 60System Optimization
Section titled “System Optimization”# Reduce swappiness (use RAM before swap)sudo sysctl vm.swappiness=10echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
# Disable unnecessary servicessudo systemctl disable snapdsudo systemctl disable man-dbRunning as a System Service
Section titled “Running as a System Service”Create a systemd service for automatic startup:
# Create service filesudo nano /etc/systemd/system/hermes-gateway.serviceAdd:
[Unit]Description=Hermes Agent GatewayAfter=network.target
[Service]Type=simpleUser=hermesWorkingDirectory=/home/hermesEnvironment=HOME=/home/hermesEnvironment=PATH=/home/hermes/.local/bin:/usr/local/bin:/usr/bin:/binExecStart=/home/hermes/.local/bin/hermes gatewayRestart=alwaysRestartSec=10
[Install]WantedBy=multi-user.targetEnable and start:
sudo systemctl daemon-reloadsudo systemctl enable hermes-gatewaysudo systemctl start hermes-gateway
# Check statussudo systemctl status hermes-gateway
# View logssudo journalctl -u hermes-gateway -fSecurity Hardening
Section titled “Security Hardening”1. Firewall Setup (UFW)
Section titled “1. Firewall Setup (UFW)”sudo apt install ufwsudo ufw default deny incomingsudo ufw default allow outgoingsudo ufw allow 22/tcp # SSHsudo ufw allow 80/tcp # HTTP (if needed)sudo ufw allow 443/tcp # HTTPS (if needed)sudo ufw enable2. SSH Hardening
Section titled “2. SSH Hardening”sudo nano /etc/ssh/sshd_config
# Set these options:PermitRootLogin noPasswordAuthentication noPubkeyAuthentication yesMaxAuthTries 3
# Restart SSHsudo systemctl restart sshd3. Automatic Updates
Section titled “3. Automatic Updates”sudo apt install unattended-upgradessudo dpkg-reconfigure unattended-upgrades4. Fail2Ban (Intrusion Prevention)
Section titled “4. Fail2Ban (Intrusion Prevention)”sudo apt install fail2bansudo systemctl enable fail2bansudo systemctl start fail2banMonitoring on a Budget
Section titled “Monitoring on a Budget”Basic Monitoring Script
Section titled “Basic Monitoring Script”# Create monitoring scriptcat > ~/monitor.sh << 'EOF'#!/bin/bashCPU=$(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!"fiEOF
chmod +x ~/monitor.sh
# Run manually or add to cron~/monitor.shFree External Monitoring
Section titled “Free External Monitoring”Use free tiers of monitoring services:
- UptimeRobot: 50 monitors free (HTTP ping every 5 minutes)
- Pingdom: 1 monitor free
- StatusCake: 10 tests free
Backup Strategy
Section titled “Backup Strategy”Automated Daily Backup
Section titled “Automated Daily Backup”# Create backup scriptcat > ~/backup.sh << 'EOF'#!/bin/bashBACKUP_DIR="$HOME/backups"DATE=$(date +%Y%m%d)
mkdir -p $BACKUP_DIR
# Backup Hermes configtar czf $BACKUP_DIR/hermes-$DATE.tar.gz ~/.hermes/
# Keep only last 7 daysfind $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 -Offsite Backup
Section titled “Offsite Backup”Sync to free cloud storage:
# Install rclonesudo apt install rclone
# Configure (follow prompts)rclone config
# Add to backup scriptrclone sync ~/backups remote:hermes-backupsTroubleshooting Low Memory
Section titled “Troubleshooting Low Memory”Symptoms
Section titled “Symptoms”- Slow response times
- “Out of memory” errors
- System freezes
- Killed processes (OOM killer)
Solutions
Section titled “Solutions”# Check memory usagefree -hps aux --sort=-%mem | head -20
# Check swap usageswapon --show
# Clear caches (temporary relief)sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches
# Find memory leakssudo apt install smemsmem -pUpgrade Options
Section titled “Upgrade Options”If 1GB is insufficient:
- Add swap (already done above)
- Upgrade VPS to next tier (~$10/month for 2GB)
- Use lighter models (smaller context, faster models)
- Limit concurrent tasks in Hermes config
Cost Comparison
Section titled “Cost Comparison”| Provider | Monthly Cost | Specs | Best For |
|---|---|---|---|
| Hetzner | €4.51 | 2 vCPU, 4GB RAM | Best value |
| DigitalOcean | $6 | 1 vCPU, 1GB RAM | Reliability |
| Linode | $5 | 1 vCPU, 1GB RAM | Support |
| Vultr | $5 | 1 vCPU, 1GB RAM | Speed |
| Oracle Cloud | Free | 2 vCPU, 1GB RAM | Budget (complex setup) |
Conclusion
Section titled “Conclusion”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.