OpenClaw Safe Update
Run production-safe OpenClaw upgrades with isolation-first defaults.
Workflow
- 1. Use bundled script:
scripts/openclaw-safe-update.sh. - Run verify-only first (default):
-
bash scripts/openclaw-safe-update.sh
- Optional target pin:
--target <version>
- Port is auto-selected from free ports starting at
18000.
- 3. If verify fails, inspect log path printed by script and report the root cause.
- If verify passes, ask whether to apply.
- Apply only on explicit confirmation:
- INLINECODE4
Platform references
Detect OS first, then read exactly one platform guide:
- - macOS (
uname = Darwin) → INLINECODE7 - Linux (
uname = Linux) → INLINECODE10
Rules
- - Default to verify-only; never apply without explicit user consent.
- Keep candidate install isolated (
npm --prefix ~/.openclaw/versions/<version>). - Keep sidecar isolated (
--profile sidecar-verify, dedicated --port). - Preserve logs on failure and include path in status updates.
- If verify fails, do not mutate global install.
OpenClaw 安全更新
以隔离优先的默认设置运行生产安全的 OpenClaw 升级。
工作流程
- 1. 使用捆绑脚本:scripts/openclaw-safe-update.sh。
- 首先仅运行验证(默认):
- bash scripts/openclaw-safe-update.sh
- 可选目标版本:--target <版本>
- 端口从 18000 开始的空闲端口自动选择。
- 3. 如果验证失败,检查脚本打印的日志路径并报告根本原因。
- 如果验证通过,询问是否应用。
- 仅在明确确认后应用:
- bash scripts/openclaw-safe-update.sh --apply
平台参考
先检测操作系统,然后准确读取一个平台指南:
- - macOS(uname = Darwin)→ references/macos.md
- Linux(uname = Linux)→ references/linux.md
规则
- - 默认仅验证;未经用户明确同意绝不应用。
- 保持候选安装隔离(npm --prefix ~/.openclaw/versions/<版本>)。
- 保持边车隔离(--profile sidecar-verify,专用 --port)。
- 失败时保留日志,并在状态更新中包含路径。
- 如果验证失败,不修改全局安装。