跳转到主要内容

更新

保持 OpenClaw 为最新版本。

推荐:openclaw update

最快更新的方法。它会检测您的安装类型(npm 或 git),获取最新版本,运行 openclaw doctor,并重启网关。
openclaw update
要切换渠道或定位到特定版本:
openclaw update --channel beta
openclaw update --tag main
openclaw update --dry-run   # preview without applying
有关渠道的语义,请参阅 开发渠道

备选方案:重新运行安装程序

curl -fsSL https://openclaw.ai/install.sh | bash
添加 --no-onboard 以跳过新手引导。对于源码安装,请传递 --install-method git --no-onboard

备选方案:手动 npm 或 pnpm

npm i -g openclaw@latest
pnpm add -g openclaw@latest

自动更新

自动更新功能默认关闭。在 ~/.openclaw/openclaw.json 中启用:
{
  update: {
    channel: "stable",
    auto: {
      enabled: true,
      stableDelayHours: 6,
      stableJitterHours: 12,
      betaCheckIntervalHours: 1,
    },
  },
}
渠道行为
stable等待 stableDelayHours,然后对 stableJitterHours 应用确定性抖动(分阶段推出)。
beta每隔 betaCheckIntervalHours 检查一次(默认:每小时)并立即应用。
dev不自动应用。手动使用 openclaw update
网关还会在启动时记录更新提示(使用 update.checkOnStart: false 禁用)。

更新后

1
运行医生
2
openclaw doctor
3
迁移配置,审核私信策略,并检查网关健康状况。详情:Doctor
4
重启网关
5
openclaw gateway restart
6
验证
7
openclaw health

回滚

固定版本 (npm)

npm i -g openclaw@<version>
openclaw doctor
openclaw gateway restart
提示:npm view openclaw version 显示当前发布的版本。

固定提交 (源码)

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/openclaw,由 BeaversLab 翻译,遵循 MIT 协议 发布。
Last modified on March 27, 2026