Install
openclaw skills install openclaw-updaterSafely update OpenClaw with pre-flight checks and rollback support. Use when updating OpenClaw, checking for updates, or recovering from a failed update. Handles workspace git commits, config backups, version rollback, and post-update verification.
openclaw skills install openclaw-updaterSafely update OpenClaw with automatic pre-flight safety checks and rollback capability.
Before running openclaw update, always run the pre-update script:
bash scripts/pre-update.sh
Optional: specify a backup script to run during pre-flight:
BACKUP_SCRIPT=~/repo/scripts/backup-openclaw.sh bash scripts/pre-update.sh
The script will:
workspace* directories under ~/.openclaw/openclaw.json to /tmp/openclaw.json.bak/tmp/openclaw-prev-version.txtThe update script sends success/failure notifications via Telegram Bot API (bypasses OpenClaw gateway, so it works even if the update breaks the gateway).
Create ~/.openclaw/.telegram-notify.env:
TELEGRAM_BOT_TOKEN=<your-bot-token>
TELEGRAM_CHAT_ID=<your-chat-id>
chmod 600 ~/.openclaw/.telegram-notify.env
The bot token is the same one used by your OpenClaw Telegram channel. Chat ID can be found via openclaw directory.
Run the full update with automatic pre-flight + notification:
bash scripts/update.sh
This will: pre-flight → update → wait for gateway → notify via Telegram.
After pre-flight passes:
openclaw update
After updating, verify:
openclaw status
openclaw gateway status
Check that:
If the update breaks something:
bash scripts/rollback.sh
The script will:
/tmp/openclaw-prev-version.txtnpm install -g openclaw@<version>openclaw.json from backupIf the rollback script isn't available:
# Install specific version
npm install -g openclaw@<version>
# Restore config
cp /tmp/openclaw.json.bak ~/.openclaw/openclaw.json
# Restart
openclaw gateway restart
If config and workspaces are both corrupted:
# Find latest backup
ls -t ~/repo/backups/openclaw-*.tar.gz | head -1
# Restore (overwrites ~/.openclaw/)
tar xzf ~/repo/backups/openclaw-<timestamp>.tar.gz -C ~/