oclaw/openclaw/docs/install/updating.md
oliver dbbe3add6a 重构主控编排与运行时预热链路,统一工作区提示词/专家调度协议并补齐 wiki 记忆注入与写回闭环。
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。

Made-with: Cursor
2026-04-26 08:34:33 +08:00

3.6 KiB

summary read_when title
Updating OpenClaw safely (global install or source), plus rollback strategy
Updating OpenClaw
Something breaks after an update
Updating

Updating

Keep OpenClaw up to date.

The fastest way to update. It detects your install type (npm or git), fetches the latest version, runs openclaw doctor, and restarts the gateway.

openclaw update

To switch channels or target a specific version:

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

--channel beta prefers beta, but the runtime falls back to stable/latest when the beta tag is missing or older than the latest stable release. Use --tag beta if you want the raw npm beta dist-tag for a one-off package update.

See Development channels for channel semantics.

Alternative: re-run the installer

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

Add --no-onboard to skip onboarding. For source installs, pass --install-method git --no-onboard.

Alternative: manual npm, pnpm, or bun

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

Auto-updater

The auto-updater is off by default. Enable it in ~/.openclaw/openclaw.json:

{
  update: {
    channel: "stable",
    auto: {
      enabled: true,
      stableDelayHours: 6,
      stableJitterHours: 12,
      betaCheckIntervalHours: 1,
    },
  },
}
Channel Behavior
stable Waits stableDelayHours, then applies with deterministic jitter across stableJitterHours (spread rollout).
beta Checks every betaCheckIntervalHours (default: hourly) and applies immediately.
dev No automatic apply. Use openclaw update manually.

The gateway also logs an update hint on startup (disable with update.checkOnStart: false).

After updating

Run doctor

openclaw doctor

Migrates config, audits DM policies, and checks gateway health. Details: Doctor

Restart the gateway

openclaw gateway restart

Verify

openclaw health

Rollback

Pin a version (npm)

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

Tip: npm view openclaw version shows the current published version.

Pin a commit (source)

git fetch origin
git checkout "$(git rev-list -n 1 --before=\"2026-01-01\" origin/main)"
pnpm install && pnpm build
openclaw gateway restart

To return to latest: git checkout main && git pull.

If you are stuck

  • Run openclaw doctor again and read the output carefully.
  • For openclaw update --channel dev on source checkouts, the updater auto-bootstraps pnpm when needed. If you see a pnpm/corepack bootstrap error, install pnpm manually (or re-enable corepack) and rerun the update.
  • Check: Troubleshooting
  • Ask in Discord: https://discord.gg/clawd