Hermes Agent: Deployment Modes

Last updated: 2026-08-31

Deployment mode determines where Hermes Agent runs — your local laptop, a Docker container, a cloud server, or a cluster. Choose the right mode for stability and cost-effectiveness.

💡 Tip: Hermes supports four deployment modes: local standalone, Docker container, cloud server, and cluster mode. Local mode is recommended for individuals; Docker or cloud server for teams.

📋 Prerequisites: Lesson 2 Installation, Lesson 3 Configuration File

1. What You Will Learn

# Content
Four deployment modes comparison
Local mode configuration
Docker deployment
Cloud server deployment
Cluster mode and scaling

2. Story

(1) Pain Point: Choosing the Wrong Deployment

Bob runs Hermes locally, but when his computer shuts down, the Agent goes offline. The team needs a 24/7 online Agent.

(2) Solution: Choose Deployment by Scenario

BASH
# Alice's choice:
# Development & debugging → Local mode (cost-effective, convenient)
# Team use → Docker on server (24/7 online)
# High concurrency → Cluster mode (horizontal scaling)

3. Four Deployment Modes Comparison

Dimension Local Mode Docker Cloud Server Cluster Mode
Use Case Individual dev Team/Small business Medium business Large scale
Uptime When powered on 24/7 24/7 24/7
Scalability ✅ Vertical ✅ Vertical ✅ Horizontal
Data Security ✅ Local ✅ Local ⚠️ Cloud ⚠️ Distributed
Cost Free Server cost Cloud fees High
Ops Difficulty ⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐

4. Local Mode

(1) Standard Local Installation

BASH
# Install
pip install hermes-agent[all]

# Start
hermes serve --host 0.0.0.0 --port 8080

# Background run (Linux/macOS)
nohup hermes serve &

# Using systemd (Linux)
cat > /etc/systemd/system/hermes.service << EOF
[Unit]
Description=Hermes Agent
After=network.target

[Service]
Type=simple
User=alice
WorkingDirectory=/home/alice
ExecStart=/usr/local/bin/hermes serve
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
EOF

systemctl enable hermes
systemctl start hermes

(2) Local Mode Configuration

YAML
# ~/.hermes/config.yaml
deployment:
  mode: "local"
  host: "0.0.0.0"
  port: 8080
  
  # Local model support (offline operation)
  local_model:
    enabled: true
    provider: "ollama"
    fallback_to_cloud: true

5. Docker Deployment

(1) Single Container

BASH
# Pull image
docker pull nousresearch/hermes-agent:latest

# Run
docker run -d \
  --name hermes \
  -p 8080:8080 \
  -v ~/.hermes:/root/.hermes \
  -e OPENAI_API_KEY="${OPENAI_API_KEY}" \
  --restart unless-stopped \
  nousresearch/hermes-agent:latest
YAML
# docker-compose.yml
version: "3.8"

services:
  hermes:
    image: nousresearch/hermes-agent:latest
    container_name: hermes-agent
    restart: unless-stopped
    ports:
      - "8080:8080"
    volumes:
      - ./data:/root/.hermes
      - ./projects:/root/projects
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
      - HERMES_MODEL_DEFAULT=gpt-4o
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3

  # Ollama local model
  ollama:
    image: ollama/ollama:latest
    container_name: ollama
    restart: unless-stopped
    ports:
      - "11434:11434"
    volumes:
      - ./ollama-data:/root/.ollama
    deploy:
      resources:
        reservations:
          devices:
            - capabilities: ["gpu"]

  # Web UI
  web-ui:
    image: nousresearch/hermes-web:latest
    container_name: hermes-web
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - HERMES_API_URL=http://hermes:8080

6. Cloud Server Deployment

(1) AWS Deployment

BASH
# Using AWS EC2
# 1. Launch EC2 instance (t3.medium recommended)
# 2. Install Docker
# 3. Run Hermes

ssh ec2-user@your-instance

# Install Docker
sudo yum install -y docker
sudo systemctl start docker

# Run Hermes
docker run -d \
  -p 8080:8080 \
  -v /data/hermes:/root/.hermes \
  -e OPENAI_API_KEY="sk-..." \
  --restart unless-stopped \
  nousresearch/hermes-agent:latest

(2) Security Configuration

YAML
# Cloud deployment security hardening
security:
  # API authentication
  api:
    auth_enabled: true
    auth_type: "jwt"           # jwt / api_key / oauth
    jwt_secret: "${JWT_SECRET}"
    rate_limit: 100            # RPM

  # TLS
  tls:
    enabled: true
    cert: "/etc/ssl/hermes.crt"
    key: "/etc/ssl/hermes.key"

  # Network isolation
  network:
    allowed_origins:
      - "https://your-domain.com"
    blocked_ips: []

7. Cluster Mode

(1) Architecture Diagram

100%
graph TB
    LB[Load Balancer] --> W1[Worker 1]
    LB --> W2[Worker 2]
    LB --> W3[Worker 3]
    
    W1 --> Redis[(Redis<br/>Shared Memory)]
    W2 --> Redis
    W3 --> Redis
    
    W1 --> DB[(PostgreSQL<br/>Persistent Storage)]
    W2 --> DB
    W3 --> DB
    
    W1 --> MQ[RabbitMQ<br/>Task Queue]
    W2 --> MQ
    W3 --> MQ

(2) Cluster Configuration

YAML
# docker-compose.cluster.yml
version: "3.8"

services:
  hermes-master:
    image: nousresearch/hermes-agent:latest
    environment:
      - HERMES_ROLE=master
      - HERMES_WORKERS=3
      - REDIS_URL=redis://redis:6379
      - DATABASE_URL=postgresql://hermes:pass@postgres:5432/hermes
    depends_on:
      - redis
      - postgres

  hermes-worker:
    image: nousresearch/hermes-agent:latest
    environment:
      - HERMES_ROLE=worker
      - REDIS_URL=redis://redis:6379
    deploy:
      replicas: 3
    depends_on:
      - redis

  redis:
    image: redis:7-alpine
    volumes:
      - redis-data:/data

  postgres:
    image: postgres:16-alpine
    environment:
      - POSTGRES_DB=hermes
      - POSTGRES_USER=hermes
      - POSTGRES_PASSWORD=pass
    volumes:
      - pg-data:/var/lib/postgresql/data

❓ FAQ

Q Which mode for individual users?
A Local mode. Simple, free, best privacy. Consider Docker when you need 24/7 availability.
Q Docker vs direct install?
A Docker offers better isolation, easier migration and upgrades. Direct install is lighter with lower latency. Choose based on your needs.
Q Is cloud deployment data secure?
A API Keys are encrypted, TLS encrypts transmission, optional encrypted disks. But data is on the cloud — for high compliance requirements, local deployment is recommended.
Q When do I need cluster mode?
A When concurrent users >50, requests per minute >100, or high availability is required. Small teams don't need it.
Q How to monitor deployment status?
A hermes status shows running state, /health API health check, Docker uses docker ps.
Q How to upgrade smoothly?
A Docker is easiest — pull new image and restart. Local install uses pip install --upgrade. Cluster mode uses rolling upgrades.

📖 Summary


📝 Exercises

  1. Basic (⭐): Start Hermes in local mode, connect to Telegram platform, verify stable operation for 24 hours.
  2. Intermediate (⭐⭐): Use Docker Compose to deploy Hermes + Ollama for local offline inference.
  3. Advanced (⭐⭐⭐): Deploy Hermes on a cloud server, configure TLS and JWT authentication for secure remote access.
Web-Tutorial.com

Web-Tutorial Tech Team

A team of developers maintaining programming tutorials. Each tutorial is written and reviewed by developers with expertise in that field. We work to keep our content accurate and reliable — if you spot an issue, please let us know.

100%

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏