gateway-watchdog

Self-healing watchdog for OpenClaw gateway. Auto-backup openclaw.json before changes, health-check the gateway process, and auto-rollback to last known good config on failure. Use when setting up gateway resilience, self-recovery, auto-restart, config backup, or when the user mentions watchdog, self-heal, gateway down, or config recovery.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "gateway-watchdog" with this command: npx skills add mupengi-bot/gw-self-heal

Gateway Watchdog

Automated self-healing system for OpenClaw gateway failures including config corruption, process crashes, and auth failures.

How It Works

Three-layer protection:

  1. Config Guard — Auto-backup openclaw.json on every successful health check
  2. Process Watchdog — Detect gateway process death → auto-restart
  3. Auth Health Check — Detect running-but-broken state → rollback config → restart

Setup

Run the setup script to install the watchdog:

bash scripts/setup-watchdog.sh

This will:

  • Create the watchdog script at ~/.openclaw/watchdog.sh
  • Register it as a cron job (every minute)
  • Take an initial config backup

Manual Commands

# Check watchdog status
bash scripts/watchdog-status.sh

# Force backup current config
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak

# View watchdog logs
cat ~/.openclaw/watchdog.log | tail -20

# Disable watchdog
crontab -l | grep -v watchdog | crontab -

Recovery Levels

LevelConditionActionAuto?
1Process dead, config OKRestart gateway
2Process alive, health check failRollback config + restart
3No valid backup existsLog alert, notify if possible⚠️ Manual

Config Backup Strategy

  • Auto-backup: On every successful health check, current config overwrites .bak
  • Pre-change backup: Before any openclaw.json edit, copy to .bak.prev
  • Broken config preserved: Failed configs saved as .broken.<timestamp> for debugging

Logs

All watchdog activity logged to ~/.openclaw/watchdog.log with timestamps.

Platform Support

  • macOS: cron-based (launchd alternative in references/launchd.md)
  • Linux: cron or systemd (see references/systemd.md)
  • Docker: Use HEALTHCHECK directive (see references/docker.md)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Fast Douyin Publish

抖音视频自动发布助手。一键上传视频到抖音,支持自动文案生成和标签优化。

Registry SourceRecently Updated
General

Skills Finder

Intelligent skill matcher that searches multiple skill marketplaces (ClawHub & Skills.sh) in real-time. Supports ANY language for user input, multi-step skil...

Registry SourceRecently Updated
General

Claw Self Improving Plus

Turn raw mistakes, corrections, discoveries, and repeated decisions into structured learnings and promotion candidates. Use when the user wants a conservativ...

Registry SourceRecently Updated