ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

实操手册-openclaw升级

2026/8/4 20:23:52 拓冰建站 浏览量
实操手册-openclaw升级 目录一、直接升级失败二、升级前备份可选三、按提示升级相关组件1. 安装NodeSource仓库2. 安装 Node.js会自动覆盖旧版本3. 验证版本4. 重新升级 OpenClaw5.重新验证版本6.更新插件(容易忘记)7.Doctor 检查8.重启网关9.拓展为什么使用NodeSource仓库升级1. Ubuntu官方仓库的版本比较旧2. NodeSource是 Node.js官方维护的独立仓库一、直接升级失败之前的版本是2026.5.7 (eeef486)有段时间没有升级了于是想着按常规操作直接进行升级结果失败了。rootlavm-rh3z5lsj1q:~# npm install -g openclawlatestnpmwarn EBADENGINE Unsupported engine{npmwarn EBADENGINE package:openclaw2026.7.1-2,npmwarn EBADENGINE required:{node:22.22.3 23 || 24.15.0 25 || 25.9.0},npmwarn EBADENGINE current:{node:v22.22.2, npm:10.9.7}npmwarn EBADENGINE}added15packages, removed265packages, and changed285packagesin2m67packages are lookingforfunding runnpmfundfordetails二、升级前备份可选cp-r/root/.openclaw/ /root/.openclaw-backup/三、按提示升级相关组件1. 安装NodeSource仓库curl-fsSLhttps://deb.nodesource.com/setup_24.x|sudo-Ebash-2. 安装 Node.js会自动覆盖旧版本sudoapt-getinstall-ynodejs3. 验证版本node-v# 应显示 v24.x.x如下rootlavm-rh3z5lsj1q:~# node -vv24.18.14. 重新升级 OpenClawnpminstall-gopenclawlatest5.重新验证版本openclaw--version可以看到openclaw版本已经升级完成rootlavm-rh3z5lsj1q:~# openclaw -vOpenClaw2026.7.1-2(0790d9f)6.更新插件(容易忘记)openclaw plugins update--all更新插件以保证相应插件在新版本上还能正常使用rootlavm-rh3z5lsj1q:~# openclaw plugins update --all│ ◇ Installing openclaw/feishu into /root/.openclaw/npm/projects/openclaw-feishu-dc69f44688… Linked peerDependencyopenclaw-/usr/lib/node_modules/openclaw Updated feishu:2026.5.7 -2026.7.1. qwen is up todate(2026.7.1). zai is up todate(2026.7.1). Restart the gateway to load plugins and hooks.7.Doctor 检查openclaw doctor--fix健康检查过程中可以看到版本升级后自动进行了qwen 的 API 密钥迁移如果没有做此动作大模型的对话功能将不可用模型调用会全部失败... ◇ Auth profile SQLite migration ──────────────────────────────────────────────────────╮ │ │ │ - ~/.openclaw/agents/main/agent/auth-profiles.json / │ │ ~/.openclaw/agents/main/agent/auth-state.json │ │ - openclaw doctor--fiximports legacy auth profile JSON into the per-agent SQLite │ │ database and removes the old files after backup. │ │ │ ├──────────────────────────────────────────────────────────────────────────────────────╯...另外列出一些自己感觉需要处理的提示... ◇ Command owner ────────────────────────────────────────────────────────────────────────────╮ │ │ │ Nocommandowner is configured. │ │ Acommandowner is the human operator account allowed to run owner-only commands and │ │ approve dangerous actions, including /diagnostics, /export-trajectory, /config, andexec│ │ approvals. │ │ DM pairing only lets someone talk to the bot;it does notmakethat sender the ownerfor│ │ privileged commands. │ │ Fix:setcommands.ownerAllowFrom to your channel user id,forexample openclaw config │ │setcommands.ownerAllowFrom[telegram:123456789]│ │ Restart the gateway after changing thisifit is already running. │ │ │ ├────────────────────────────────────────────────────────────────────────────────────────────╯ │ ◇ Plugin registry ───────────────────────────────────────────╮ │ │ │ Plugin registry refreshed:52/70 enabled plugins indexed. │ │ │ ├─────────────────────────────────────────────────────────────╯ │ ◆ Archive18orphan transcript filesin~/.openclaw/agents/main/sessions? This only renames them to *.deleted.timestamp. │ ● Yes / ○ No说明系统发现 ~/.openclaw/agents/main/sessions 目录下有 18 个孤立的会话转录文件问我们是否要归档只是重命名为 *.deleted.时间戳不会真正删除。建议选 Yes这些是旧版本遗留的孤儿文件归档后不会影响任何功能能让目录更整洁。其它相关提示也类似我们按需按提示进行操作即可。8.重启网关这套组合拳适用于任何用 systemd 管理的用户服务OpenClaw、Docker、Nginx 等# 1. 改了配置 → 让 systemd 重新加载systemctl--userdaemon-reload# 2. 重启服务systemctl--userrestart openclaw-gateway.service# 3. 确认状态systemctl--userstatus openclaw-gateway.service# 可选如果 status 还是 failed前台启动看详细报错# openclaw gateway run附openclaw gateway run(直接在终端前台启动 gateway)和 systemctl restart 的区别:方式运行环境适用场景退出后systemctl --user restart ...后台systemd 托管正式运行自动重启openclaw gateway run前台当前终端调试排错服务停止至此升级完成网关重启后即可恢复正常使用。9.拓展为什么使用NodeSource仓库升级1. Ubuntu官方仓库的版本比较旧Ubuntu 为了保证系统稳定性官方仓库里的 Node.js 版本通常是frozen冻结的Ubuntu 22.04 官方源Node.js v12Ubuntu 24.04 官方源Node.js v18这意味着sudoaptinstallnodejs# 可能装的是 v12 或 v18远落后于当前需求sudoaptupgrade nodejs# 只能升到 Ubuntu 官方维护的最新补丁大版本不会变2. NodeSource是 Node.js官方维护的独立仓库NodeSource 是 Node.js 官方团队直接维护的 Debian/Ubuntu 包仓库特点维度Ubuntu 官方源NodeSource 仓库版本冻结在发布时的版本提供 Node 18/20/22/24 等所有活跃版本更新频率仅安全补丁跟随 Node.js 官方发布节奏包来源Ubuntu 维护者打包Node.js 官方团队直接打包与系统冲突可能与其他系统包耦合独立安装不依赖系统其他组件