curl 一键安装 · hermes doctor 自检 · 模型与 Gateway · 平台对照 · 六步 Runbook
想在 2026 年跑通 Nous Research Hermes Agent(GitHub 约 17.4 万 Star)却卡在 PATH、API Key 或 Telegram 不回复?本文给保姆级安装路径:官方 curl | bash 自动装 Python 3.11 / Node 22、hermes doctor 十二项自检、hermes setup 配模型与 Gateway,再到 Telegram 7×24。结构含环境要求、部署平台对照、六步 Runbook、常见报错表,并说明为何生产常驻更推荐 Mac Mini M4 月租。
Hermes Agent(Nous Research,MIT)是 2026 年 GitHub 热度最高的开源 自进化 AI Agent 之一:完成一类任务后会自动生成可复用 Skill,社区口径同类任务 token 可降约 38%;通过 Gateway 接入 Telegram / Discord / Slack 等 20+ 平台,支持 MCP 与 Claude / OpenRouter / Ollama 等多后端。与 OpenClaw、LangGraph 的差异在于:跨 Session 持久记忆(SESSION → MEMORY.md → USER.md)与原生 Skill 自动创建,且官方安装脚本可在 $5 级 VPS 或 Mac 上跑通——但生产 7×24 与 macOS 浏览器类 Skill 仍更吃宿主选型。
本文不写空泛概念,只解决安装期五大痛点:hermes: command not found、未配 API Key、升级后配置漂移、Telegram 群聊无响应、以及「装在本机合盖就断」的常驻难题。若你已跑通安装并关心记忆架构,可对照三层记忆与 7×24 实测。
| 环境项 | 最低要求 | 推荐(生产 Gateway) |
|---|---|---|
| 系统 | macOS 12+ / Ubuntu 20.04+ / WSL2 | macOS 14+(Apple Silicon)或 Ubuntu 24.04 LTS |
| Python / Node | 脚本自动安装 3.11 / 22 | 无需手动装,以 hermes doctor 为准 |
| 内存 | 4 GB(仅 Gateway + 云端 API) | 16 GB+;本地模型建议 32 GB UMA |
| 磁盘 | 约 1.5 GB(含 Skills 缓存) | 20 GB SSD+,留 FTS5 与日志增长 |
| 网络 | 可访问 GitHub raw + LLM API | 稳定低延迟,利于 IM webhook |
以为要先装 Python/Node:官方 install.sh 用 uv 装 Python 3.11、Node 22、ripgrep、ffmpeg,无需 sudo。
装完不 source Shell:PATH 未刷新导致 command not found,需 source ~/.zshrc 或新开终端。
跳过 hermes doctor:十二项自检能提前发现 API Key、ffmpeg、PATH 问题,比盲跑 hermes 省一小时。
无头服务器开浏览器依赖:VPS 请加 --skip-browser,避免 Camoufox 类依赖拉挂安装。
本机 POC 当生产:MacBook 合盖 Gateway 断档,Skill 复利无法累积;7×24 需专用宿主。
同一行 curl | bash,换宿主后差异在uptime、IO、macOS 原生路径。安装教程能跑通 ≠ 适合让 Gateway 与 Skill 复利 7×24 在线——下表按「装完 Hermes 之后」的生产体感归纳(社区与机房实测区间)。
| 平台 | 7×24 可用性 | Skill 复利 | 月成本体感 | 适合场景 |
|---|---|---|---|---|
| 个人 MacBook | ≈ 60%(合盖即断) | 频繁中断 | ¥0 硬件 + 高焦虑 | 仅 POC / 本地 CLI 试玩 |
| 树莓派 4B 8GB | ≈ 88% | I/O 瓶颈,长任务易超时 | 硬件一次性 | 玩票,不建议生产 Gateway |
| x86 VPS 4GB | ≈ 99.5% | 稳定,无 macOS Skill | 按量计费 | 纯 API + Telegram,不要浏览器自动化 |
| Mac Mini M4 月租 | 机房 SLA,30 天级 100% | UMA + launchd 守护,Skill 持续累积 | 固定月租 | Telegram 7×24 + Camoufox / 本地 Ollama |
安装只需十分钟;选对 7×24 宿主才决定 Skill 是复利还是反复从零开始。
M4 统一内存让 Gateway(社区口径常驻约 4.2 GB)、浏览器自动化与 SQLite WAL 共享地址空间;launchd 在 macOS 上比 Linux systemd 更贴合官方测试路径。短期验证可先租 1 个月,跑通 Telegram 与 Skill 曲线再决定自购——详见30 天亲历。
以下步骤在 macOS / Linux / WSL2 通用;无头 VPS 在第 1 步加 --skip-browser。数据与配置默认落在 ~/.hermes/,升级前请备份。
一键安装:执行官方脚本,等待 ✅ Hermes Agent installed at ~/.hermes,然后 source ~/.zshrc(Linux 用 ~/.bashrc)。
健康检查:hermes doctor 通过 Python、Node、ripgrep、ffmpeg、PATH;hermes --version 确认 v0.14+。
配置模型:hermes setup 或 hermes model;OpenRouter / Anthropic / Nous Portal 等写入 ~/.hermes/.env。
CLI 冒烟:hermes 进入交互,下发含工具调用的任务(如「统计当前目录文件数」)确认 API 通畅。
Telegram:BotFather 创建 Bot → hermes gateway setup 选 Telegram,填 Token 与 TELEGRAM_ALLOWED_USERS;群聊需关隐私模式并重新拉 Bot 入群。
7×24 守护:hermes gateway install && hermes gateway start;Linux 可用 sudo hermes gateway install --system,macOS 走 launchd 用户服务。
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash source ~/.zshrc hermes doctor hermes setup hermes gateway setup hermes gateway install hermes gateway start hermes gateway status
API Key 也可手动写入:hermes config set OPENROUTER_API_KEY sk-or-xxxx 或追加到 ~/.hermes/.env。升级后若报配置缺失,执行 hermes config check && hermes config migrate。
下列症状多出现在「脚本已成功但服务不可用」阶段——按表逐项排除,避免同时改模型、迁移目录与重装 Gateway。
| 报错 / 现象 | 常见原因 | 处理 |
|---|---|---|
| hermes: command not found | PATH 未刷新 | source ~/.zshrc 或新开终端 |
| API key not set | 未配置 LLM | hermes model 或写入 ~/.hermes/.env |
| Missing config after update | 版本升级配置漂移 | hermes config check && hermes config migrate |
| ModuleNotFoundError: dotenv | 误用系统 Python | 使用 ~/.hermes/hermes-agent/venv/bin/hermes |
| Telegram 群聊无响应 | Bot 隐私模式 | BotFather 关 Group Privacy,踢出再拉入群 |
Hermes 支持任意 MCP Server(GitHub、数据库、浏览器等),在 ~/.hermes/config.yaml 声明 mcp_servers;无头环境 OAuth 可用 hermes mcp login + SSH 隧道。生产建议先跑通单通道再叠 MCP,便于日志二分定位。
提示:Windows 可用 PowerShell 安装脚本,但 Dashboard /chat 终端面板依赖 WSL2;推荐 WSL2 + Linux 安装路径,与本文 Runbook 一致。
~/.hermes/hermes-agent/,全局命令由脚本写入 PATH。hermes doctor 覆盖约 12 项(Python 3.11、Node 22、ripgrep、ffmpeg、API Key 等)。笔记本与家用 NAS 能完成安装验收,却在合盖休眠、跨区 VPS IO 与缺少 macOS 浏览器 Skill 上削弱 Telegram 7×24 体验;树莓派则难扛本地 8B 与长任务。对要把 Hermes 当「常驻同事」的团队,Mac Mini M4 月租把 uptime、UMA 与 launchd 打包成可预期 OpEx——比反复重装更省时间。
若你已完成本文 Runbook 并需要生产级 7×24 节点,VpsMesh 提供 Mac Mini M4 云端租赁:SSH 交付、面板看资源、退租前可备份整个 ~/.hermes/。套餐见 Mac Mini M4 租赁价格,部署问题见 帮助中心,在线下单见 订购页。
注意:勿在同一周末同时换宿主、升级 Hermes 大版本、改 Telegram 白名单——三项并行无法二分定位。先 hermes gateway status 稳定 24h,再动模型或 MCP。
不需要。官方 install.sh 通过 uv 安装 Python 3.11、Node.js 22、ripgrep 与 ffmpeg,仓库位于 ~/.hermes/hermes-agent/。安装后执行 source ~/.zshrc 并运行 hermes doctor 验收十二项检查。
默认隐私模式下群聊只响应 / 命令。在 BotFather → Bot Settings → Group Privacy 选择 Turn off,并将 Bot 踢出群后重新邀请。同时确认 TELEGRAM_ALLOWED_USERS 含你的数字 ID,且 hermes gateway status 为运行中。