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
(2) Docker Compose (Recommended)
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
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
- Four modes: Local (individual) → Docker (team) → Cloud server (enterprise) → Cluster (large scale)
- Local mode is zero cost, most private, suitable for development and testing
- Docker Compose one-click deployment, includes Ollama and Web UI
- Cloud server requires security hardening: authentication, TLS, network isolation
- Cluster mode uses Redis + PostgreSQL for shared memory and high availability
📝 Exercises
- Basic (⭐): Start Hermes in local mode, connect to Telegram platform, verify stable operation for 24 hours.
- Intermediate (⭐⭐): Use Docker Compose to deploy Hermes + Ollama for local offline inference.
- Advanced (⭐⭐⭐): Deploy Hermes on a cloud server, configure TLS and JWT authentication for secure remote access.