有为青年

在生命的旅途中,感悟岁月的深度与珍贵,追求内心的平静与成长。

Hermes Agent 与第三方 Web UI 安装实录

2026-05-27

Hermes Agent 与第三方 Web UI 安装实录

时间:2026-05-27
环境:Ubuntu 24.04 LTS / Linux 6.17 / Node.js v26.1.0 / Python 3.12 系统环境,Hermes 自带 Python 3.11 venv

这次目标是把 Hermes Agent 装起来,并同时准备两个网页入口:

1. **官方 Hermes Dashboard**:用于管理配置、API Key、会话等。

2. **第三方 hermes-web-ui**:一个独立的 Web 管理界面,提供更完整的聊天、终端、日志、模型、平台配置等功能。

下面是完整安装和排查过程。


1. 安装 Hermes Agent

官方仓库是 NousResearch 的 hermes-agent。README 里的快速安装命令是:

curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

我没有直接盲跑,而是先把安装脚本下载到本地检查:

mkdir -p /root/.openclaw/workspace/tmp
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh \
  -o /root/.openclaw/workspace/tmp/hermes-install.sh
sed -n '1,220p' /root/.openclaw/workspace/tmp/hermes-install.sh

确认脚本逻辑后,用跳过交互向导的方式安装:

bash /root/.openclaw/workspace/tmp/hermes-install.sh --skip-setup

第一次安装中断在 Git 检查:

Git not found
Please install Git:
  sudo apt update && sudo apt install git

于是补齐 Git:

DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y git

然后重新执行安装脚本:

bash /root/.openclaw/workspace/tmp/hermes-install.sh --skip-setup

安装器做了几件事:

• 安装 `uv`

• 通过 `uv` 安装 Python 3.11.15

• 克隆 `https://github.com/NousResearch/hermes-agent.git`

• 创建虚拟环境

• 安装 Hermes Agent 及依赖

• 安装 `ripgrep`、`ffmpeg`

• 安装 Playwright Chromium / Headless Shell

• 同步 Hermes 自带 skills

• 创建配置目录 `~/.hermes`

root 用户下采用 FHS 布局:

Code:    /usr/local/lib/hermes-agent
Command: /usr/local/bin/hermes
Data:    /root/.hermes

2. 验证 Hermes Agent

安装完成后验证版本和命令:

command -v hermes
hermes --version
hermes --help

结果:

Hermes Agent v0.14.0 (2026.5.16)
Project: /usr/local/lib/hermes-agent
Python: 3.11.15
OpenAI SDK: 2.24.0

随后执行:

hermes doctor --fix

它修复了一个 symlink 问题:

Created symlink: ~/.local/bin/hermes → /usr/local/lib/hermes-agent/venv/bin/hermes

最终两个入口都可用:

/usr/local/bin/hermes
/root/.local/bin/hermes

3. 关于“为什么没看到端口”

安装后检查进程和端口:

pgrep -a -f 'hermes|run_agent|uvicorn|agent-browser'
ss -ltnp
hermes status
hermes gateway status
hermes logs gateway -n 200

当时能看到 Hermes Gateway 进程在跑,但没有监听 Web 端口。

日志里关键内容是:

No messaging platforms enabled.
Gateway will continue running for cron job execution.
Cron ticker started (interval=60s)

结论:Hermes Gateway 默认不是网页服务。如果没有配置 Telegram、Discord、WhatsApp、WeCom 等平台,它可以只作为 cron/gateway 后台进程存在,不一定会监听 TCP 端口。

如果要网页界面,需要单独启动 Dashboard。


4. 启动官方 Hermes Dashboard

查看帮助:

hermes dashboard --help

默认端口是 9119,默认只监听 127.0.0.1。为了从局域网访问,使用:

hermes dashboard --host 0.0.0.0 --port 9119 --insecure --no-open

第一次启动后发现进程存在,但端口没起来。排查后发现它卡在前端构建阶段。于是手动构建官方 Dashboard 前端:

cd /usr/local/lib/hermes-agent/web
npm run build

构建完成后,用跳过构建模式启动,并开启网页 Chat:

hermes dashboard \
  --host 0.0.0.0 \
  --port 9119 \
  --insecure \
  --no-open \
  --skip-build \
  --tui

验证:

ss -ltnp | grep ':9119'
curl -sS http://127.0.0.1:9119/ | head

确认端口已经监听:

0.0.0.0:9119

访问地址:

http://192.168.12.17:9119/

并确认网页 Chat 已启用:

__HERMES_DASHBOARD_EMBEDDED_CHAT__=true

注意:--insecure 表示 Dashboard 绑定到非 localhost,官方会提示风险。这个界面可能暴露配置和 API Key,建议只在可信内网使用;如果要公网访问,应加 VPN、Nginx Basic Auth 或其它认证层。


5. 安装第三方 hermes-web-ui

用户提到想使用第三方的:

hermes-web-ui start

先检查 npm 包信息:

npm view hermes-web-ui name version description bin repository homepage engines dependencies --json

确认包信息:

{
  "name": "hermes-web-ui",
  "version": "0.6.3",
  "description": "Self-hosted AI chat dashboard for Hermes Agent — multi-model web UI with multi-platform integration",
  "bin": {
    "hermes-web-ui": "bin/hermes-web-ui.mjs"
  },
  "engines": {
    "node": ">=23.0.0"
  }
}

当前 Node.js 是 v26.1.0,满足要求。

为了先看包内容,执行:

npm pack hermes-web-ui@0.6.3 --pack-destination /root/.openclaw/workspace/tmp
mkdir -p /root/.openclaw/workspace/tmp/hermes-web-ui-pkg
tar -xzf /root/.openclaw/workspace/tmp/hermes-web-ui-0.6.3.tgz \
  -C /root/.openclaw/workspace/tmp/hermes-web-ui-pkg

README 里的推荐安装方式就是:

npm install -g hermes-web-ui
hermes-web-ui start

于是正式安装:

npm install -g hermes-web-ui@0.6.3

验证命令:

command -v hermes-web-ui
hermes-web-ui --version
hermes-web-ui --help

结果:

/root/.nvm/versions/node/v26.1.0/bin/hermes-web-ui
hermes-web-ui v0.6.3

6. 启动第三方 Web UI

启动命令:

hermes-web-ui start

输出:

Starting hermes-web-ui (PID: 282272, port: 8648)...
hermes-web-ui started
http://localhost:8648
Log: /root/.hermes-web-ui/server.log

验证服务:

hermes-web-ui status
ss -ltnp | grep ':8648'
curl -sS http://127.0.0.1:8648/health

健康检查结果:

{
  "status": "ok",
  "platform": "hermes-agent",
  "version": "v0.14.0 (2026.5.16)",
  "gateway": "running",
  "webui_version": "0.6.3",
  "webui_latest": "0.6.3",
  "webui_update_available": false,
  "node_version": "26.1.0"
}

监听端口:

0.0.0.0:8648

访问地址:

http://192.168.12.17:8648/

默认登录账号:

admin / 123456

首次登录后建议立即修改密码。


7. 常用命令汇总

Hermes Agent

hermes --version
hermes --help
hermes doctor
hermes doctor --fix
hermes status
hermes setup
hermes
hermes -z "你好,介绍一下你自己"

Hermes Gateway

hermes gateway status
hermes gateway setup
hermes gateway install
hermes gateway start
hermes gateway stop
hermes logs gateway -n 200

官方 Dashboard

# 启动,带网页 Chat
hermes dashboard --host 0.0.0.0 --port 9119 --insecure --no-open --skip-build --tui

# 查看状态
hermes dashboard --status

# 停止
hermes dashboard --stop

访问:

http://192.168.12.17:9119/

第三方 hermes-web-ui

hermes-web-ui start
hermes-web-ui status
hermes-web-ui restart
hermes-web-ui stop
hermes-web-ui reset-default-login
hermes-web-ui clear-login-locks

访问:

http://192.168.12.17:8648/

8. 两个 Web UI 的区别

| 项目 | 官方 Dashboard | 第三方 hermes-web-ui |

|---|---|---|

| 命令 | hermes dashboard | hermes-web-ui start |

| 默认端口 | 9119 | 8648 |

| 来源 | Hermes Agent 官方自带 | npm 第三方包 |

| 聊天 | 需要 --tui 开启网页 Chat | 自带聊天界面 |

| 认证 | 官方提示没有强认证 | 默认账号 admin / 123456 |

| 适合场景 | 轻量管理 Hermes 配置 | 更完整的 Web 管理和聊天体验 |


9. 本次最终状态

最终机器上同时保留两个网页入口:

官方 Dashboard:     http://192.168.12.17:9119/
第三方 Web UI:      http://192.168.12.17:8648/

Hermes Agent 安装目录:

/usr/local/lib/hermes-agent

Hermes 数据与配置目录:

/root/.hermes

第三方 Web UI 数据目录:

/root/.hermes-web-ui

到这里,Hermes Agent、官方 Dashboard、第三方 hermes-web-ui 都已经可用。