更新
保持 OpenClaw 為最新版本。
建議使用:openclaw update
Section titled “建議使用:openclaw update”最快的更新方式。它會偵測您的安裝類型(npm 或 git),擷取最新版本,執行 openclaw doctor,並重新啟動閘道。
openclaw update若要切換通道或指定特定版本:
openclaw update --channel betaopenclaw update --tag mainopenclaw update --dry-run # preview without applying請參閱 開發通道 以了解通道語意。
替代方案:重新執行安裝程式
Section titled “替代方案:重新執行安裝程式”curl -fsSL https://openclaw.ai/install.sh | bash加入 --no-onboard 以略過上手引導。若是原始碼安裝,請傳遞 --install-method git --no-onboard。
替代方案:手動使用 npm 或 pnpm
Section titled “替代方案:手動使用 npm 或 pnpm”npm i -g openclaw@latestpnpm add -g openclaw@latest自動更新程式
Section titled “自動更新程式”自動更新程式預設為關閉。在 ~/.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 停用)。
npm i -g openclaw@<version>openclaw doctoropenclaw gateway restart提示:npm view openclaw version 會顯示目前發布的版本。
git fetch origingit checkout "$(git rev-list -n 1 --before=\"2026-01-01\" origin/main)"pnpm install && pnpm buildopenclaw gateway restart若要回到最新版本:git checkout main && git pull。
如果您遇到困難
Section titled “如果您遇到困難”- 再次執行
openclaw doctor並仔細閱讀輸出內容。 - 檢查:疑難排解
- 在 Discord 中詢問:https://discord.gg/clawd