Skip to content

更新

保持 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