Appearance
更新
保持 OpenClaw 版本最新。
推荐方式:openclaw update
最快捷的更新方式。它会自动检测安装类型(npm 或 git),拉取最新版本,运行 openclaw doctor,并重启 gateway。
bash
openclaw update切换发布渠道或指定版本:
bash
openclaw update --channel beta
openclaw update --tag main
openclaw update --dry-run # 预览变更但不实际应用关于渠道语义,参见开发渠道。
备用方式:重新运行安装脚本
bash
curl -fsSL https://openclaw.ai/install.sh | bash添加 --no-onboard 可跳过引导向导。源码安装时,追加 --install-method git --no-onboard。
备用方式:手动 npm 或 pnpm
bash
npm i -g openclaw@latestbash
pnpm add -g openclaw@latest自动更新
自动更新默认关闭。在 ~/.openclaw/openclaw.json 中启用:
json5
{
update: {
channel: "stable",
auto: {
enabled: true,
stableDelayHours: 6,
stableJitterHours: 12,
betaCheckIntervalHours: 1,
},
},
}| 渠道 | 行为 |
|---|---|
stable | 等待 stableDelayHours,然后在 stableJitterHours 范围内以确定性抖动应用(分散推送)。 |
beta | 每 betaCheckIntervalHours(默认每小时)检查一次,立即应用。 |
dev | 不自动应用,使用 openclaw update 手动更新。 |
Gateway 在启动时也会记录更新提示(用 update.checkOnStart: false 禁用)。
更新后的操作
运行 doctor 检查:
bash
openclaw doctor迁移配置、审查 DM 策略并检查 gateway 健康状态。详情:Doctor
重启 gateway:
bash
openclaw gateway restart验证:
bash
openclaw health版本回滚
固定版本(npm)
bash
npm i -g openclaw@<version>
openclaw doctor
openclaw gateway restart提示:npm view openclaw version 可查看当前已发布的版本。
固定到某个 commit(源码安装)
bash
git fetch origin
git checkout "$(git rev-list -n 1 --before="2026-01-01" origin/main)"
pnpm install && pnpm build
openclaw gateway restart恢复到最新版本:git checkout main && git pull。
如果卡住了
- 再次运行
openclaw doctor并仔细阅读输出。 - 查看:故障排查
- 在 Discord 提问:https://discord.gg/clawd