跳转到内容

更新

保持 OpenClaw 为最新版本。

最快更新的方法。它会检测您的安装类型(npm 或 git),获取最新版本,运行 openclaw doctor,并重启网关。

Terminal window
openclaw update

要切换渠道或定位到特定版本:

Terminal window
openclaw update --channel beta
openclaw update --tag main
openclaw update --dry-run # preview without applying

有关渠道的语义,请参阅 开发渠道

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

添加 --no-onboard 以跳过新手引导。对于源码安装,请传递 --install-method git --no-onboard

Terminal window
npm i -g openclaw@latest
Terminal window
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 禁用)。

    Terminal window
    npm i -g openclaw@<version>
    openclaw doctor
    openclaw gateway restart

    提示:npm view openclaw version 显示当前发布的版本。

    Terminal window
    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