禁用Bonjour/mDNS 服务发现机制 by Win 2026.3.22
网关窗口警告信息
[bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=AIO-PC (OpenClaw)._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
原因:是Bonjour/mDNS 服务发现机制的正常自我修复行为,表明网关在网络中未能正确广播其服务存在,watchdog 正在尝试重新发布服务公告。
解决办法:禁用 mDNS 发现(不需要局域网发现时),编辑 ~/.openclaw/config.json 文件,添加 / 修改discovery节点配置:
{ "discovery": { "mdns": { "mode": "off" } } }
更新与回滚 by Win 2026.3.22
手工更新
首先停止 openclaw gateway stop ,避免文件可能处于被占用状态,更新时可能会遇到权限错误或替换失败。
- 方式一:
openclaw update --no-restart,但在 Windows下:- 需要管理员权限(来创建计划任务),或更新后先
openclaw gateway stop,再以管理员权限运行openclaw gateway restart或openclaw gateway install - 不带
--no-restart更新后,会重启网关,有个关不掉findstr /r /c:":18789 .*LISTENING"窗口,需要运行taskkill /im findstr.exe /f来关闭,才能正常启动成功。
- 需要管理员权限(来创建计划任务),或更新后先
- 方式二:
npm i -g openclaw@latest
更新后三步走:
openclaw doctor
openclaw gateway restart
openclaw health
function ocUp {
openclaw gateway stop
openclaw update --no-restart
openclaw plugins update --all
openclaw gateway start
}
ClawHub的更新
ClawHub 作为 OpenClaw v2026.3.22 版本引入的官方插件市场,其功能与主程序紧密集成,包含更新。更新主程序后,你可以通过以下方式管理 ClawHub 中的插件:
- 安装新插件:使用
openclaw plugins install <package>命令。系统会优先从 ClawHub 检索并安装。openclaw plugins支持的子命令包括:list、info、install、enable、disable、uninstall、doctor、update
- 更新所有技能:ClawHub 支持对已安装的技能(Skill)进行批量更新
clawhub update,确保你使用的都是最新版本。 - 在聊天中管理:新版还新增了
/plugins和/plugin命令,允许你直接在对话界面中查看和开关插件。
回滚
npm i -g openclaw@<version>
openclaw doctor
openclaw gateway restart
配置自动升级
开启方法,在Win + 2026.3.28 (f9b1079)上每一步都会重启网关
# 开启自动更新
openclaw config set update.auto.enabled true|false
# 设置更新通道为稳定版
openclaw config set update.channel stable
# 设置稳定版更新延迟(小时)
openclaw config set update.auto.stableDelayHours 6
# 设置更新抖动范围(小时)
openclaw config set update.auto.stableJitterHours 12
配置后检查
- 检查配置:运行
openclaw status | grep -A 5 "update"或openclaw status | Select-String "update",确认配置已正确写入。 - 查看日志:查看网关日志,搜索
auto-update scheduled或next check in等关键词,确认定时任务已注册。 - 模拟运行:执行
openclaw update --dry-run,该命令会模拟更新过程,但不会实际执行更新,可以检查配置是否能被正确解析。
子命令大全 by OpenClaw 2026.7.1
命令后缀带 * 代表包含子命令,执行 命令名 --help 查看子命令详情
| 序号 | 命令 | 中文功能描述 |
|---|---|---|
| 1 | acp * | 运行对接网关的 ACP 协议桥接服务 |
| 2 | agent | 通过网关单次执行一轮 Agent 任务;加 –local 使用本地嵌入式运行 |
| 3 | agents * | 管理隔离 Agent:工作目录、鉴权、消息路由规则 |
| 4 | approvals * | 管理执行权限审批(网关侧 / 宿主机侧) |
| 5 | attach | 将 Claude Code 挂载至网关会话,提供受限 MCP 工具调用权限 |
| 6 | audit | 审计元数据:查询 Agent 运行、工具调用操作记录 |
| 7 | backup * | 创建本地数据备份包,并校验备份文件完整性 |
| 8 | capability * | 查询模型服务商能力,别名 infer |
| 9 | channels * | 管理已接入聊天渠道与各渠道登录账号 |
| 10 | chat | 打开本地终端交互界面,等价 tui –local |
| 11 | clawbot * | 旧版 ClawBot 兼容别名命令集 |
| 12 | commitments * | 查看、管理 AI 推理生成的后续待执行计划 |
| 13 | completion | 生成对应 Shell 的命令自动补全脚本 |
| 14 | config * | 非交互式配置工具:读取 / 修改 / 删除配置、打印配置路径、校验配置结构;无参则启动交互式配置引导 |
| 15 | configure | 交互式配置向导:配置密钥、聊天渠道、网关、Agent 默认参数 |
| 16 | crestodian | 零信任底层环境初始化与故障修复工具 |
| 17 | cron * | 通过网关管理定时任务 |
| 18 | daemon * | 管理网关后台服务(适配 launchd/systemd/Windows 计划任务) |
| 19 | dashboard | 使用当前登录令牌打开网页控制面板 |
| 20 | devices * | 设备配对、设备访问令牌管理 |
| 21 | directory * | 渠道联系人 / 群组 ID 查询:自身、私聊好友、群聊 ID(仅支持对应渠道) |
| 22 | dns * | 广域设备发现 DNS 工具(集成 Tailscale + CoreDNS) |
| 23 | docs | 在线检索 OpenClaw 官方文档 |
| 24 | doctor | 全套自检工具,自动修复网关、渠道常见故障 |
| 25 | exec-approvals * | 执行权限审批管理,approvals 的别名 |
| 26 | exec-policy * | 查看、同步执行权限策略与宿主机审批规则 |
| 27 | gateway * | 启动、巡检、查询 WebSocket 网关服务状态 |
| 28 | health | 从运行中的网关获取实时健康状态 |
| 29 | help | 展示 CLI 整体帮助总览 |
| 30 | hooks * | 管理 Agent 生命周期内部钩子脚本 |
| 31 | infer * | 统一入口调用各模型服务商推理能力,稳定兼容接口 |
| 32 | logs | 通过 RPC 实时追踪、读取网关日志文件 |
| 33 | mcp * | 管理 MCP 服务端配置、渠道桥接配置 |
| 34 | memory * | 检索、查看、重建 Agent 记忆文件索引 |
| 35 | message * | 发送、读取、管理渠道消息与渠道操作指令 |
| 36 | migrate * | 从其他 AI Agent 系统导入历史会话数据 |
| 37 | models * | 模型扫描、发现、服务商密钥与推理参数配置 |
| 38 | node * | 运行、管理单机独立节点后台服务 |
| 39 | nodes * | 网关远程节点管理:配对、状态查询、远程调用、媒体处理 |
| 40 | onboard | 一站式初始化向导:鉴权、模型、网关、工作区、渠道、技能全套配置 |
| 41 | pairing * | 私聊安全配对,审批外部设备接入请求 |
| 42 | plugins * | OpenClaw 插件、扩展组件安装与管理 |
| 43 | promos * | 查询、领取 ClawHub 平台限时免费模型额度 |
| 44 | proxy * | 启动调试代理,抓取并查看完整网络交互流量 |
| 45 | qr | 生成移动端配对二维码与配对验证码 |
| 46 | reset | 重置本地配置与业务数据(仅保留 CLI 程序本体) |
| 47 | sandbox * | Docker 容器沙箱管理,实现 Agent 运行环境隔离 |
| 48 | secrets * | 密钥运行时管控工具 |
| 49 | security * | 审计本地配置、数据目录,排查各类安全风险配置 |
| 50 | sessions * | 列出本地全部存储的对话会话 |
| 51 | setup | onboard 初始化命令的别名 |
| 52 | skills * | 列出、查看当前可用工具技能详情 |
| 53 | status | 展示渠道在线状态、近期活跃会话对象 |
| 54 | system * | 系统底层工具:事件、心跳、在线状态管理 |
| 55 | tasks * | 查询持久化后台任务、任务流程运行状态 |
| 56 | terminal | 打开本地终端交互界面,等价 tui –local |
| 57 | transcripts * | 查看本地完整历史对话记录 |
| 58 | tui | 连接网关,启动终端交互式操作界面 |
| 59 | uninstall | 卸载网关后台服务、删除本地业务数据(保留 CLI 工具) |
| 60 | update * | OpenClaw 版本升级、查询更新渠道状态 |
| 61 | webhooks * | Webhook 回调接口与第三方集成管理 |
| 62 | worktrees * | 创建、查看、回滚、清理托管式独立工作目录 |
日志查看 by OpenClaw 2026.7.1
Ubuntu 24.04 OpenClaw Gateway 日志查看分三种场景:systemd 常驻服务日志、CLI 实时跟踪、原始日志文件路径
官方封装 CLI 日志命令(跨平台统一,无需记 journalctl)
# 实时跟踪全部日志
$ openclaw logs --follow --local-time
# 过滤只看路由绑定、消息分发日志
$ openclaw logs --follow | grep Routing
systemd 用户服务日志(systemctl –user 部署)
# 实时滚动查看日志(最常用)
$ journalctl --user -u openclaw-gateway -f
# 只看今天日志 + 过滤关键词(比如路由、agents、tavily 搜索)
$ journalctl --user -u openclaw-gateway --since "today" | grep -E "Routing|agent=|tavily|update.channel"
# 查看最近 200 行历史日志
$ journalctl --user -u openclaw-gateway -n 200
# 按日志等级过滤(只看错误 / 警告),仅 error、fatal 级别
$ journalctl --user -u openclaw-gateway -p err -f
# journalctl 原生过滤,只保留核心日志内容(不用管道裁剪时间前缀)
journalctl --user -fu openclaw-gateway -o cat
持久化日志文件(网关落地存储): OpenClaw 会把日志持久写入文件,不依赖 journal 缓存,日志根目录:~/.openclaw/logs/,使用tail -f等命令
status by OpenClaw 2026.7.1
$ openclaw status --deep
$ openclaw status
Overview
┌──────────────────────┬─────────────────────────────────────────────────────────────────────────────
│ Item │ Value
├──────────────────────┼─────────────────────────────────────────────────────────────────────────────
│ OS │ linux 6.8.0-100-generic (x64) · node 24.18.0
│ Dashboard │ http://127.0.0.1:18789/Claw/
│ Tailscale exposure │ off
│ Channel │ stable (config)
│ Update │ npm · deps ok
│ Gateway │ local · ws://127.0.0.1:18789 (local loopback) · reachable 58ms · auth token
│ Gateway service │ systemd user installed · enabled · running (pid 46704, state active)
│ Node service │ systemd user not installed
│ Agents │ 3 · no workspaces bootstrapping · sessions 9 · default main active 16h ago
│ Memory │ enabled (plugin memory-core) · not checked
│ Plugin compatibility │ none
│ Probes │ skipped (use --deep)
│ Events │ none
│ Tasks │ none
│ Heartbeat │ 30m (main), disabled (bzwork), disabled (mylife)
│ Sessions │ 9 active · default deepseek-v4-flash (1.0m ctx) · 3 stores
Channels
┌─────────────────┬─────────┬────────┬─────────────────────────────────────────────
│ Channel │ Enabled │ State │ Detail
├─────────────────┼─────────┼────────┼─────────────────────────────────────────────
│ openclaw-weixin │ ON │ OK │ configured
│ feishu │ ON │ SETUP │ configured; status unavailable in fast mode
Node service 为 systemd user not installed
- 影响:如果你的工作流依赖独立的 Node.js 后台任务(而非仅通过 Gateway 通信),这些任务可能无法开机自启或在后台稳定运行。
- 如果有需要,执行安装:
openclaw service install-node
发表回复
要发表评论,您必须先登录。