Gateway Watchdog for Openclaw

A resilient self-healing system designed to monitor, backup, and automatically recover the Openclaw Skills gateway from process or configuration failures.

mupengi-bot
v1.0.0
Mar 6, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install gw-self-heal

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install gw-self-heal using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Gateway Watchdog?

The Gateway Watchdog is a critical utility for developers and system administrators using Openclaw Skills who require high availability and fault tolerance. It functions as a persistent background monitor that prevents downtime by managing the lifecycle of the gateway process. By implementing a multi-layered protection strategy, it addresses common failure points such as configuration corruption, sudden process crashes, and authentication errors.

This skill provides peace of mind by ensuring that any accidental breaking changes to the environment are caught and mitigated instantly. It serves as an essential component for production-grade deployments, offering robust recovery levels that range from simple process restarts to full configuration rollbacks without requiring manual intervention.

Gateway Watchdog Use Cases

  • Automating the recovery of the gateway process after unexpected system restarts or crashes.
  • Protecting the environment from configuration corruption by maintaining validated backups.
  • Implementing self-healing workflows for remote Openclaw Skills instances where manual access is limited.
  • Maintaining continuous integration and delivery by auto-rolling back failed configuration updates.

How Gateway Watchdog Works

  1. The watchdog executes a Config Guard routine that creates a verified backup of the openclaw.json file after every successful health check.
  2. A Process Watchdog layer continuously monitors the gateway to detect if the process has terminated unexpectedly.
  3. An Auth Health Check validates the operational state of the gateway to identify running-but-broken states.
  4. Upon detecting a failure, the system applies the appropriate recovery level, such as restarting the service or rolling back to a known good configuration.
  5. All recovery actions and health status updates are logged locally for audit and debugging purposes.

Gateway Watchdog Setup

To install and activate the watchdog for your Openclaw Skills gateway, execute the following setup script:

bash scripts/setup-watchdog.sh

This script automatically handles the creation of the watchdog utility at ~/.openclaw/watchdog.sh, registers the monitoring task as a recurring cron job, and performs an initial baseline backup of your configuration.

Gateway Watchdog Data Schema & Taxonomy

The Gateway Watchdog organizes its recovery data and logs within the ~/.openclaw/ directory using the following structure:

File Path Purpose
openclaw.json.bak The last known good configuration file used for auto-recovery.
openclaw.json.bak.prev A secondary backup created immediately before a configuration change.
openclaw.json.broken.<timestamp> A preserved copy of a failing configuration for manual debugging.
watchdog.log A chronological record of all health checks, restarts, and rollbacks.
watchdog.sh The core executable logic for the monitoring system.

Gateway Watchdog Advanced Features

  • Multi-level recovery logic that distinguishes between process deaths and functional failures.
  • Support for multiple platform-specific service managers including cron, systemd, and launchd.
  • Docker integration compatibility using the HEALTHCHECK directive for containerized Openclaw Skills.
  • Automated preservation of 'broken' configuration states to prevent data loss during debugging.
  • Manual override commands to force backups, check status, or disable the monitoring service.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*