← 返回
未分类 中文

OpenClaw Updater (LinZ)

Automatically check for and install OpenClaw updates. Use when the user wants to update OpenClaw to the latest version, schedule automatic updates, or check...
自动检查并安装OpenClaw更新。在用户想要更新至最新版本、安排自动更新或检查更新时使用。
zlin87468-maker zlin87468-maker 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 489
下载
💾 2
安装
1
版本
#latest

概述

OpenClaw Updater

Automatically check for and install OpenClaw updates with backup and rollback support.

Overview

This skill provides automated OpenClaw update capabilities:

  • Check current vs latest version
  • Perform safe updates with automatic backups
  • Schedule periodic auto-updates via cron
  • Dry-run mode to preview updates

Quick Start

Check Current Version

openclaw --version

Check for Updates (Dry Run)

bash ~/.openclaw/workspace/skills/openclaw-updater/scripts/update-openclaw.sh --dry-run

Perform Update

bash ~/.openclaw/workspace/skills/openclaw-updater/scripts/update-openclaw.sh

Force Reinstall

bash ~/.openclaw/workspace/skills/openclaw-updater/scripts/update-openclaw.sh --force

Setting Up Auto-Updates

Daily Auto-Update via Cron

Add to crontab for daily update checks at 3 AM:

0 3 * * * /bin/bash ~/.openclaw/workspace/skills/openclaw-updater/scripts/update-openclaw.sh >> ~/.openclaw/logs/cron-update.log 2>&1

Or use OpenClaw's built-in cron:

{
  "name": "openclaw-auto-update",
  "schedule": { "kind": "cron", "expr": "0 3 * * *" },
  "payload": {
    "kind": "systemEvent",
    "text": "Run OpenClaw auto-updater: bash ~/.openclaw/workspace/skills/openclaw-updater/scripts/update-openclaw.sh"
  },
  "sessionTarget": "main"
}

How It Works

  1. Version Check: Compares installed version against npm registry
  2. Backup: Creates timestamped backup of config and workspace
  3. Update: Runs npm install -g @openclaw/core@latest
  4. Verify: Confirms new version is installed
  5. Cleanup: Maintains only last 5 backups

Logs and Backups

  • Logs: ~/.openclaw/logs/auto-update.log
  • Backups: ~/.openclaw/backups/openclaw-backup-YYYYMMDD-HHMMSS.tar.gz

Troubleshooting

Node.js Version Issues

OpenClaw requires Node.js >= 22.16.0. If you see version warnings:

# Check current Node version
node --version

# Update Node.js (using n or nvm)
n install 22.16.0
# or
nvm install 22.16.0 && nvm use 22.16.0

Update Fails

  1. Check logs: cat ~/.openclaw/logs/auto-update.log
  2. Verify npm permissions: npm config get prefix
  3. Try with sudo if needed: sudo npm install -g @openclaw/core@latest

Rollback

If update causes issues, restore from backup:

cd ~
tar -xzf ~/.openclaw/backups/openclaw-backup-YYYYMMDD-HHMMSS.tar.gz

Script Options

OptionDescription
---------------------
--dry-runCheck for updates without installing
--forceForce update even if versions match
--helpShow usage information

Resources

scripts/

  • update-openclaw.sh - Main update script with backup/restore capabilities

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 01:25 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 32,171
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 31,368
it-ops-security

Free Ride - Unlimited free AI

shaivpidadi
管理OpenClaw的OpenRouter免费AI模型,自动按质量排名模型,配置速率限制备用方案,并更新opencla...
★ 473 📥 79,134