Quickly deploy Hermes Agent on a remote Linux/macOS server via SSH — a self-evolving AI Agent from Nous Research, with a built-in learning loop, multi-platform gateway, and skill system.
What is Hermes: It is not a coding copilot tied to an IDE, nor a chat shell for a single API. It is an autonomous Agent running on your server that remembers what it learns and gets stronger the more you use it. It supports multiple terminal backends such as Docker / SSH / Modal / Daytona / Vercel Sandbox, and connects through multiple platforms such as Telegram / Discord / Slack / WhatsApp / Signal.
Prerequisites
Before deployment, ensure:
- Control side: Already through
ssh-copy-idadded the public key to the target machine - Target machine: Linux (Ubuntu/Debian/CentOS) or macOS, with SSH service enabled
- Target machine: curl and git already installed (basic tools)
- Keys: Hold an API Key for at least one model provider (such as DeepSeek / OpenAI / Anthropic / OpenRouter, etc.)
- Network: The target machine can access GitHub (
github.com) and PyPI (pypi.org)
Note: The installation script automatically installs all dependencies including Python 3.11, Node.js 22, uv, ripgrep, ffmpeg, etc.; no manual pre-installation is required.
Workflow
Deployment is divided into 5 steps, automatically completed by scripts/deploy.sh :
| Step | Operation | Description |
|---|---|---|
| 1 | Connectivity check | Verify SSH reachability and detect the target system type |
| 2 | Install Hermes | curl one-click installation script, automatically handles all dependencies |
| 3 | Configure model | hermes config set Configure Provider and API Key |
| 4 | Configure identity | Optional: deploy SOUL.md and AGENTS.md |
| 5 | Verify | hermes doctor diagnostics + hermes --version |
Usage
Quick execution
bash scripts/deploy.sh <user@host> <provider> <api-key>
Example:
# DeepSeek 作为默认模型
bash scripts/deploy.sh daniel@my-vps-01 deepseek sk-2312xxxx
# OpenAI
bash scripts/deploy.sh daniel@my-vps-01 openai sk-proj-xxxx --model openai/gpt-4o
# Anthropic
bash scripts/deploy.sh daniel@192.168.1.100 anthropic sk-ant-xxxx
# OpenRouter (支持 200+ 模型)
bash scripts/deploy.sh daniel@my-vps-01 openrouter sk-or-v1-xxxx --model openrouter/anthropic/claude-sonnet-4
# 预览模式(不执行)
bash scripts/deploy.sh daniel@my-vps-01 deepseek sk-xxxx --dry-run
# 跳过 Gateway 配置(纯 CLI 模式)
bash scripts/deploy.sh daniel@my-vps-01 deepseek sk-xxxx --skip-gateway
Parameters
| Parameter | Required | Default value | Description |
|---|---|---|---|
<user@host> |
✅ | — | SSH target, such as root@my-vps or user@192.168.1.100 |
<provider> |
✅ | — | Provider name:deepseek / openai / anthropic / openrouter / nous |
<api-key> |
✅ | — | API Key corresponding to the Provider |
--model |
No | Provider default model | Model ID (such as deepseek/deepseek-v4-pro) |
--skip-gateway |
No | false | Skip Gateway configuration and deploy only the CLI |
--soul-path |
No | — | Local SOUL.md path, deployed to remote |
--branch |
No | main |
Hermes installation branch |
--dry-run |
No | false | Only print commands, do not actually execute |
Provider default model
| Provider | Default model | API Key environment variable |
|---|---|---|
deepseek |
deepseek/deepseek-v4-pro |
DEEPSEEK_API_KEY |
openai |
openai/gpt-4o |
OPENAI_API_KEY |
anthropic |
anthropic/claude-sonnet-4 |
ANTHROPIC_API_KEY |
openrouter |
openrouter/anthropic/claude-sonnet-4 |
OPENROUTER_API_KEY |
nous |
nous/hermes-3-70b |
NOUS_API_KEY |
Manual step-by-step execution
If the automatic script is not applicable, you can manually operate according to the following steps:
Step 1: Connect to the target machine
ssh user@target-host
Verify:echo SSH_OK && uname -a
Step 2: Install Hermes
# 一键安装(国内可先设置代理)
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
# 或指定分支
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --branch main
After installation is complete, reload the Shell:
source ~/.bashrc # 或 source ~/.zshrc
hermes --version
Mainland China network tip: If GitHub access is slow, you can set up a proxy first
export https_proxy=http://proxy:port, or download on a machine with a proxy and transfer it via scp.
Step 3: Configure the model Provider
# 设置模型(API key 自动存入 ~/.hermes/.env)
hermes config set model deepseek/deepseek-v4-pro
hermes config set DEEPSEEK_API_KEY sk-xxxx
# 查看当前配置
hermes config
For all supported Providers and configuration methods, seeofficial documentation。
Step 4: Run interactive setup (optional but recommended)
hermes setup
The interactive wizard will guide you through:
- Model provider selection
- Tool enable/disable
- Gateway platform connection (Telegram / Discord / Slack, etc.)
- Memory system preferences
Step 5: Configure identity and context files (optional)
# 部署 SOUL.md(Agent 人格)
cat > ~/.hermes/SOUL.md << 'EOF'
# Your Agent Identity
...
EOF
# 部署 MEMORY.md(跨会话记忆)
mkdir -p ~/.hermes/memories
cat > ~/.hermes/memories/MEMORY.md << 'EOF'
# Memory
...
EOF
Step 6: Start and verify
# 诊断检查
hermes doctor
# 启动 CLI 聊天
hermes
# 启动 Gateway(多平台接入)
hermes gateway setup # 首次配置
hermes gateway start # 启动
From OpenClaw Migration
If the target machine already has OpenClaw, Hermes supports one-click migration:
# 交互式迁移(自动检测 ~/.openclaw)
hermes claw migrate
# 预览模式
hermes claw migrate --dry-run
# 仅迁移用户数据(不含密钥)
hermes claw migrate --preset user-data
Migration contents include: SOUL.md, MEMORY.md, USER.md, Skills, API Keys.
Post-Deployment Checklist
-
hermes --versionOutput the version number -
hermes doctorNo critical errors -
hermes configDisplay the correct model configuration - Can start CLI conversation normally:
hermes - (Optional) Gateway platform connection is normal
- (Optional) SOUL.md / MEMORY.md contents are correct
Troubleshooting
SSH connection failed
# 检查连通性
ssh -v user@host
# 确认目标机器 SSH 服务已开
# Linux: systemctl status sshd
# macOS: 系统设置 → 通用 → 共享 → 远程登录
# 确认公钥已复制
ssh-copy-id user@host
Installation script download failed
# 国内网络可尝试
export https_proxy=http://your-proxy:port
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
# 或手动克隆
git clone https://github.com/NousResearch/hermes-agent.git ~/.hermes/hermes-agent
cd ~/.hermes/hermes-agent
uv sync --extra all
hermes command not found
# 重载 shell 配置
source ~/.bashrc # 或 source ~/.zshrc
# 检查 PATH
echo $PATH | grep hermes
# 手动添加(安装脚本通常自动处理)
export PATH="$HOME/.hermes/hermes-agent/.venv/bin:$PATH"
Model API call failed
# 检查 API Key 配置
hermes config | grep -i key
# 测试连接
hermes doctor
# 手动设置 API Key
hermes config set DEEPSEEK_API_KEY sk-xxxx
# 或直接编辑 .env
vim ~/.hermes/.env
Special handling for mainland China environment
# 设置 uv 镜像
export UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
# 设置 npm 镜像
export NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
# 或在安装脚本前设置
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | \
env UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple bash
Directory Structure (Post-Deploy)
~/.hermes/
├── config.yaml # 主配置文件
├── .env # API Keys 和密钥
├── auth.json # OAuth 凭证
├── SOUL.md # Agent 人格定义
├── memories/ # 跨会话记忆
│ ├── MEMORY.md
│ └── USER.md
├── skills/ # Agent 自创技能
├── cron/ # 定时任务
├── sessions/ # Gateway 会话
└── logs/ # 日志
Comparison with OpenClaw deployment
| Dimension | Hermes | OpenClaw |
|---|---|---|
| Language stack | Python 3.11 + Node.js 22 | Node.js |
| Package management | uv (Python) + npm (Node) | npm |
| Installation method | curl pipe bash | npm install -g |
| Configuration method | hermes config set |
openclaw config set |
| Configuration directory | ~/.hermes/ |
~/.openclaw/ |
| Gateway | Built-in (Telegram/Discord/Slack/WhatsApp/Signal) | Built-in |
| Terminal backend | 7 types (local/docker/ssh/modal/daytona/vercel/singularity) | local |
| Learning loop | ✅ Built-in skills system + memory system | Skills system |
| Migration support | ✅ hermes claw migrate |
— |