Install
openclaw skills install sys-updaterSystem package maintenance for Ubuntu (apt), npm, brew, and OpenClaw skills. Conservative workflow with 2-day quarantine for non-security updates, automatic...
openclaw skills install sys-updaterComprehensive system maintenance automation for Ubuntu hosts with support for apt, npm, brew, and OpenClaw skills.
sys-updater is a conservative maintenance pipeline for Linux hosts running OpenClaw.
It separates security patching from feature upgrades, keeps auditable state files, and sends a human-readable daily report.
apt-get updateunattended-upgraderun_6am:
├── apt: update, security upgrades, simulate, track non-security
├── npm/brew: check outdated, add to tracking
└── skills: auto-update immediately (no quarantine)
state/apt/last_run.json — Last run resultsstate/apt/tracked.json — APT packages being trackedstate/apt/npm_tracked.json — NPM packagesstate/apt/brew_tracked.json — Brew packagesstate/logs/apt_maint.log — Daily logs (10-day rotation)# Daily maintenance (runs automatically)
./scripts/apt_maint.py run_6am
# Generate report
./scripts/apt_maint.py report_9am
# Check npm/brew only
./scripts/pkg_maint.py check
# Review packages (after 2 days)
./scripts/pkg_maint.py review
# Apply planned upgrades
./scripts/pkg_maint.py upgrade
# Update skills only
./scripts/pkg_maint.py skills
Environment variables:
SYS_UPDATER_BASE_DIR — Base directory (default: ~/clawd/sys-updater)SYS_UPDATER_STATE_DIR — State files locationSYS_UPDATER_LOG_DIR — Log files locationRequires 4 cron jobs:
run_6am — Daily 06:00 MSK (apt + check npm/brew + auto skills)report_9am — Daily 09:00 MSK (Telegram report)review_2d — T+2 days 09:00 MSK (web search bugs)upgrade_3d — T+3 days 06:00 MSK (apply planned)For unattended operation, grant the running user passwordless sudo for specific apt commands only. Do not add the user to full sudoers.
Create file /etc/sudoers.d/sys-updater:
# Allow sys-updater to run apt maintenance commands without password
# Replace 'username' with your actual username
username ALL=(root) NOPASSWD: /usr/bin/apt-get update
username ALL=(root) NOPASSWD: /usr/bin/apt-get -s upgrade
username ALL=(root) NOPASSWD: /usr/bin/unattended-upgrade -d
Set secure permissions:
sudo chmod 440 /etc/sudoers.d/sys-updater
sudo visudo -c # Verify syntax is valid
| Command | Purpose |
|---|---|
apt-get update | Refresh package lists |
apt-get -s upgrade | Simulate upgrade (dry-run, no actual changes) |
unattended-upgrade -d | Apply security updates automatically |
apt-get upgrade without -s (simulation only for tracking)apt-get dist-upgrade or autoremove