惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
C
Cyber Attacks, Cyber Crime and Cyber Security
Recent Announcements
Recent Announcements
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Securelist
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
B
Blog RSS Feed
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Latest news
Latest news
Microsoft Security Blog
Microsoft Security Blog
Project Zero
Project Zero
L
LangChain Blog
V
V2EX
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
SecWiki News
SecWiki News
Know Your Adversary
Know Your Adversary
Malwarebytes
Malwarebytes
MyScale Blog
MyScale Blog
腾讯CDC
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
K
Kaspersky official blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
T
True Tiger Recordings
Attack and Defense Labs
Attack and Defense Labs
博客园 - 叶小钗
Scott Helme
Scott Helme
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
量子位
P
Proofpoint News Feed
P
Proofpoint News Feed
李成银的技术随笔
T
Threat Research - Cisco Blogs
Apple Machine Learning Research
Apple Machine Learning Research
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
D
DataBreaches.Net
N
Netflix TechBlog - Medium
GbyAI
GbyAI
V
Vulnerabilities – Threatpost

中文博客 on 范叶亮 | Leo Van

LLM Token 消耗节省计划 (How to Save Token for LLM) 智能体的角色定位和身份演化 (Agent Role Orientation and Identity Evolution) 本地部署 OpenClaw,QwenPaw 和 Hermes Agent (Local Deployment of OpenClaw, QwenPaw and Hermes Agent) 部署 Matrix 服务器 Synapse (Deployment of Matrix Server Synapse) 部署 frp 内网穿透服务 (Deployment of frp NAT Traversal Service) 本地部署大模型服务 (Local Deployment of LLM Services) AI 时代的生产力和生产关系 (Forces and Relations of Production in AI Era) 业余无线电入门 - CQ, CQ, CQ, this is BD1CZP. Calling CQ and standing by. 重构 - 之于代码、之于工作、之于生活 大语言模型微调 (Fine-tuning Large Language Models) 提升图片分辨率和质量 - Invoke AI 101 教程 使用画布创建和组合生成新的图片 - Invoke AI 101 教程 探索 AI 模型和概念适配器 - Invoke AI 101 教程 理解图像到图像和降噪过程 - Invoke AI 101 教程 使用控制层和指示控制图片的生成 - Invoke AI 101 教程 使用 Invoke 创作你的第一张图片 - Invoke AI 101 教程 在 OpenWrt 和群晖中自动申请和部署证书 凡人歌 - 凡人,但不要烦心 Shell 调用方式 fork,exec 和 source (Run Shell with fork, exec and source) 重定向和管道 (Redirect and Pipe) 模型压缩和推理加速 (Model Compression and Inference Acceleration) 我们需要多少种编程语言 (How Many Programming Languages do We Need) 数据可视化小贴士 - 面向动态文档生成,秉承规范、统一和实用的理念 从 rm -rf * 说起 - 喜新、怀旧、再出发 当我谈摄影时,我谈些什么 - 色彩篇 Part 1 CSS 布局和定位 (CSS Layout and Position) 当我谈修图时,我谈些什么 - 色彩篇 Part 1 在 Windows 下利用 WSL2 和 Ubuntu 配置 GPU 机器学习环境 文学编程和可重复性研究 (Literate Programming and Reproducible Research) 在 OpenWrt 中安装 Jellyfin 搭建家庭影音中心 自私和贪婪 (Selfish and Greedy) 评分和排名算法 (Rating & Ranking Algorithms) 小记这一波裁员浪潮 基于内容的图像检索 (Content-based Image Retrieval, CBIR) 你所应该知道的 A/B 测试 (A/B Test You Should Know) 一个人的摩旅 (Travel with My Motorcycle Alone) 设计语言初探 (A Glimpse of Design Language) Spark 集群搭建 (Spark Cluster Setup) Hive 安装和配置 (Hive Setup) Hadoop 集群搭建 (Hadoop Cluster Setup) 虚拟环境准备 (Virtual Environment Preparation) 大数据 SQL 性能调优 (Big Data SQL Performance Tuning) SQL 样式指南 (SQL Style Guide) 进程,线程和协程 (Process, Thread and Coroutine) - 实现篇 进程,线程和协程 (Process, Thread and Coroutine) - 理论篇 胶囊网络 (Capsule Network) 投票公平合理吗? 图存储与计算 (Network Storage and Computing) - 复杂网络系列 网络算法 (Network Algorithms) - 复杂网络系列 真实世界网络结构 (Structure of Real-World Network) - 复杂网络系列 网络表示,测度和度量 (Network Representation, Measures and Metrics) - 复杂网络系列 文本相似度 (Text Similarity) 而立之前 (Life before 30) 最近邻搜索 (Nearest Neighbor Search) 无模型策略预测和控制 - 时序差分学习 (Model-Free Policy Prediction and Control - Temporal Difference Learning) - 强化学习系列 无模型策略预测和控制 - 蒙特卡洛方法 (Model-Free Policy Prediction and Control - Monte-Carlo Learning) - 强化学习系列 利用动态规划求解马尔可夫决策过程 (Planning by Dynamic Programming) - 强化学习系列 贝叶斯优化 (Bayesian Optimization) 马尔可夫决策过程 (Markov Decision Process) - 强化学习系列 多臂赌博机 (Multi-armed Bandit) - 强化学习系列 强化学习简介 (Introduction of Reinforcement Learning) - 强化学习系列 在群晖 NAS 上编译安装 tmux 隐马尔可夫,条件随机场和序列标注 (Hidden Markov Model, Conditional Random Fields and Sequence Labeling) 图嵌入和图神经网络 (Graph Embedding and Graph Neural Network) 预训练自然语言模型 (Pre-trained Models for NLP) toB 产品用户权限 (User Privileges of toB Products) 京东数科 HIPO 学习之旅 (JDD HIPO Learning Journey) 杭州和东京之旅 (Tour of Hangzhou and Tokyo) 国际智慧温室种植挑战赛 (International Autonomous Greenhouse Challenge) 记忆中的儿时 (My Childhood in Memory) 启发式算法 (Heuristic Algorithms) 关不掉的浏览器标签页 (Browser Tabs You do not Close) 贝塞尔曲线 (Bézier Curve) 如何阅读一本书 (How to Read a Book) 相似性和距离度量 (Similarity and Distance Measurement) 集成学习算法 (Ensemble Learning) 计算复杂性与动态规划 (Computational Complexity and Dynamic Programming) 利用 Flask 和 Google App Engine 部署模型服务 序列到序列和注意力机制 (Seq2Seq and Attention Machanism) 词向量 (Word Embeddings) 循环神经网络 (Recurrent Neural Network, RNN) 泰国之行 (Tour of Thailand) 媒介之战 (War of Medias) 卷积神经网络 (Convolutional Neural Network, CNN) 买书,囤书,看书 (Buy Books, Hoard Books and Read Books) Play Safe, Smart Choice & Yuppie 基于 PyQt5/PySide2 和 QML 的跨平台 GUI 程序开发 流形学习 (Manifold Learning) 深度学习优化算法 (Optimization Methods for Deep Learning) 深度学习优化算法 (Optimization Methods for Deeplearning) 生成对抗网络简介 (GAN Introduction) Ising 模型,Hopfield 网络和受限的玻尔兹曼机 (Ising, Hopfield and RBM) 马尔科夫链蒙特卡洛方法和吉布斯采样 (MCMC and Gibbs Sampling) 特征值分解,奇异值分解和主成分分析 (EVD, SVD and PCA) 墨尔本之行 (Trip to Melbourne)
本地部署智能体 - OpenClaw,QwenPaw,Hermes Agent ...
2026-04-18 · via 中文博客 on 范叶亮 | Leo Van

本地部署智能体

OpenClaw,QwenPaw,Hermes Agent …

范叶亮 / 2026-04-18

分类: AI, Tech101, 教程 / 字数: 2264 / 标签: 人工智能, AI, 本地部署, Podman, OpenClaw, QwenPaw, Hermes Agent


环境信息

本教程将介绍在 macOS 环境下部署 OpenClaw,QwenPaw 和 Hermes Agent。如无特殊说明,macOS 系统下需在终端中执行命令,Windows 系统下需要在 PowerShell 中执行命令。本教程涉及到的软件信息如下:

软件信息
软件 版本
Podman 5.8.2
OpenClaw 2026.4.16
QwenPaw 1.1.2
Hermes Agent 0.10.0

虚拟环境

为了更好的进行环境隔离,后续我们使用 Podman 安装不同的智能体框架。

提示

在 Windows 系统下,单击开始按钮,搜索 启用或关闭 Windows 功能,在打开的窗口中将 Hyper-V适用于 Linux 的 Windows 子系统 及其子项全部勾选,单击确定,待系统启用功能后重启电脑。

运行如下命令安装 Podman:

为了方便观察 Podman 的运行情况,可选的运行如下命令安装 Podman Desktop:

brew install podman-desktop

scoop install podman-desktop

安装完毕后,运行如下命令初始化并启动 Podman:

podman machine init
podman machine start

podman machine init
podman machine start

运行如下命令查看 Podman 的安装和运行情况:

podman info

podman info

更多 Podman 使用方法请参考 Podman 文档。有关 Podman Desktop 的使用方法请参考 Podman Desktop 文档

安装

克隆 OpenClaw 的源代码至本地:

git clone git@github.com:openclaw/openclaw.git

git clone git@github.com:openclaw/openclaw.git

运行如下命令安装 OpenClaw CLI:

curl -fsSL https://openclaw.ai/install-cli.sh | bash

命令会在 ~/.openclaw 目录下安装 Node 环境和相关依赖。进入 OpenClaw 源代码目录下,运行如下命令构建 Gateway 容器:

export OPENCLAW_DOCKER_APT_PACKAGES="chromium"
./scripts/podman/setup.sh

其中 OPENCLAW_DOCKER_APT_PACKAGES 表示构建 Gateway 容器时使用 apt 命令额外安装的软件包。运行如下命令启动 Gateway 容器:

./scripts/run-openclaw-podman.sh launch

运行如下命令进行配置:

./scripts/run-openclaw-podman.sh launch setup

在配置过程中根据实际情况对模型提供商等选项进行配置。配置如下环境变量来使用宿主机中的 OpenClaw CLI 管理 OpenClaw 容器:

export PATH="$PATH:/Users/leo/.openclaw/bin"
export OPENCLAW_CONTAINER=openclaw

在合适的目录创建如下文件夹:

mkdir /path/to/openclaw
mkdir /path/to/openclaw/workspace

进入 OpenClaw 源代码目录下,运行如下命令构建 Gateway 容器:

podman build -t openclaw:local -f Dockerfile . --build-arg OPENCLAW_DOCKER_APT_PACKAGES="chromium"

其中 OPENCLAW_DOCKER_APT_PACKAGES 表示构建 Gateway 容器时使用 apt 命令额外安装的软件包。运行如下命令配置并启动 Gateway 容器:

$env:OPENCLAW_CONFIG_DIR = "/path/to/openclaw"
$env:OPENCLAW_WORKSPACE_DIR = "/path/to/openclaw/workspace"

podman compose run --rm --no-deps --entrypoint node openclaw-gateway `
  dist/index.js onboard --mode local --no-install-daemon

podman compose run --rm --no-deps --entrypoint node openclaw-gateway `
  dist/index.js config set --batch-json '[{"path":"gateway.mode","value":"local"},{"path":"gateway.bind","value":"lan"},{"path":"gateway.controlUi.allowedOrigins","value":["http://localhost:18789","http://127.0.0.1:18789"]}]'

podman compose up -d openclaw-gateway

在配置中过程中根据实际情况对模型提供商等选项进行配置。

使用 Podman 安装 OpenClaw 后,重启 Gateway 的命令如下:

podman restart openclaw

podman restart openclaw-openclaw-gateway-1

使用浏览器打开 http://127.0.0.1:18789/ 即可进入 OpenClaw 管理页面。更多细节请参考 OpenClaw 文档

警告

OpenClaw 管理页面虽然支持权限校验,但为了安全起见,请勿将其暴露在公网。

消息频道

提示

在 Windows 系统下,podman compose 命令需要在 OpenClaw 源代码目录下运行。

飞书

运行如下命令配置飞书消息频道:

openclaw channels login --channel feishu

podman compose exec openclaw-gateway node dist/index.js channels login --channel feishu

使用飞书 APP 扫描生成的二维码进行后续配置即可。

Discord

首先在 Discord 中创建一个服务器,进入 Discord 开发者门户,单击 新 APP 按钮创建新的应用,并填写应用名称。

进入 概况 - 机器人 选项卡,启用 Presence IntentServer Members IntentMessage Content Intent

进入 概况 - 机器人 选项卡,单击 重置令牌 生成令牌,注意令牌仅显示一次,请妥善保管以便后续使用。

进入 概况 - OAuth2 选项卡,在 OAuth2 URL 生成器的 范围 中选中 botapplications.commands

机器人权限 中选中 查看频道发送消息阅读消息历史记录嵌入链接添加文件添加反应

已生成的 URL 中的 URL 复制到浏览器打开,按照提示安装应用并授权。

打开 Discord 应用,进入 用户设置 页面,在 开发者 菜单中启用 开发者模式。在频道图标上右键,单击 复制服务器 ID,在个人头像上左键,单击 复制用户 ID

运行如下命令配置 Discord 消息频道:

openclaw config set channels.discord.token "你的 TOKEN"
openclaw config set channels.discord.enabled true --strict-json

podman compose exec openclaw-gateway node dist/index.js config set channels.discord.token "你的 TOKEN"
podman compose exec openclaw-gateway node dist/index.js config set channels.discord.enabled true --strict-json

向机器人发送任意消息,根据机器人回复的消息运行如下命令进行授权:

openclaw pairing approve discord <CODE>

podman compose exec openclaw-gateway node dist/index.js pairing approve discord <CODE>

此时就可以通过 Discord 私信和机器人对话了。在配置文件中添加如下内容来支持在服务器中同机器人对话:

{
  "channels": {
    "discord": {
      "groupPolicy": "allowlist",
      "guilds": {
        "服务器 ID": {
          "requireMention": true,
          "users": ["用户 ID"]
        }
      }
    }
  }
}

默认情况下,机器人只有在被 @ 时才会响应,如果需要对每条消息都进行响应,可以将 requireMention 设置为 false

QwenPaw

安装

在合适的目录创建如下文件夹:

mkdir -p /path/to/qwenpaw/data
mkdir -p /path/to/qwenpaw/secrets

mkdir /path/to/qwenpaw/data
mkdir /path/to/qwenpaw/secrets

运行如下命令使用 Podman 安装 QwenPaw:

podman pull agentscope/qwenpaw:latest
podman run -d \
  --name qwenpaw \
  --restart always \
  -v /path/to/qwenpaw/data:/app/working \
  -v /path/to/qwenpaw/secrets:/app/working.secret \
  -p 8088:8088 \
  agentscope/qwenpaw:latest

podman pull agentscope/qwenpaw:latest
podman run -d `
  --name qwenpaw `
  --restart always `
  -v /path/to/qwenpaw/data:/app/working `
  -v /path/to/qwenpaw/secrets:/app/working.secret `
  -p 8088:8088 `
  agentscope/qwenpaw:latest

使用浏览器打开 http://127.0.0.1:8088/ 即可进入 QwenPaw 管理页面。

警告

QwenPaw 管理页面暂无权限校验,请勿将其暴露在公网。

注意

在 QwenPaw 中需要进入 智能体管理 中新建一个智能体,默认智能体 无法进行修改。

消息频道

飞书

参见:https://qwenpaw.agentscope.io/docs/channels/?lang=zh#飞书

Discord

参见:https://qwenpaw.agentscope.io/docs/channels/?lang=zh#Discord

Hermes Agent

安装

在合适的目录创建如下文件夹:

mkdir -p /path/to/hermes-agent

mkdir /path/to/hermes-agent

运行如下命令使用 Podman 配置 Hermes Agent:

podman pull nousresearch/hermes-agent:latest
podman run -it --rm \
  -v /path/to/hermes-agent:/opt/data \
  nousresearch/hermes-agent:latest setup

podman pull nousresearch/hermes-agent:latest
podman run -it --rm `
  -v /path/to/hermes-agent:/opt/data `
  nousresearch/hermes-agent:latest setup

在配置过程中根据实际情况对模型提供商等选项进行配置。运行如下代码启动 Gateway 容器:

podman run -d \
  --name hermes-agent-gateway \
  --restart unless-stopped \
  -v /path/to/hermes-agent:/opt/data \
  -p 8642:8642 \
  nousresearch/hermes-agent:latest gateway run

podman run -d `
  --name hermes-agent-gateway `
  --restart unless-stopped `
  -v /path/to/hermes-agent:/opt/data `
  -p 8642:8642 `
  nousresearch/hermes-agent:latest gateway run

运行如下代码启动 Dashboard 容器:

podman run -d \
  --name hermes-agent-dashboard \
  --restart unless-stopped \
  -v /path/to/hermes-agent:/opt/data \
  -p 9119:9119 \
  -e GATEWAY_HEALTH_URL=http://$HOST_IP:8642 \
  nousresearch/hermes-agent:latest dashboard --host 0.0.0.0 --insecure

podman run -d `
  --name hermes-agent-dashboard `
  --restart unless-stopped `
  -v /path/to/hermes-agent:/opt/data `
  -p 9119:9119 `
  -e GATEWAY_HEALTH_URL=http://$HOST_IP:8642 `
  nousresearch/hermes-agent:latest dashboard --host 0.0.0.0 --insecure

$HOST_IP 替换为运行 Gateway 容器机器的 IP 地址(注意:需使用宿主机的 IP 地址,而不是 127.0.0.1)。使用浏览器打开 http://127.0.0.1:9119/ 即可进入 Hermes Agent 管理页面。

警告

Hermes Agent 管理页面暂无权限校验,请勿将其暴露在公网。

消息频道

飞书

参见:https://hermes-agent.nousresearch.com/docs/user-guide/messaging/feishu

Discord

参见:https://hermes-agent.nousresearch.com/docs/user-guide/messaging/discord