Gateway Safety
This skill ensures that any modifications to the OpenClaw gateway configuration are done safely. It prevents "death loops" and permanent session loss by verifying the gateway can successfully reboot before committing to a new config.
Core Rules
- Mandatory Script Use: Never edit
~/.openclaw/openclaw.jsondirectly. Always use the providedsafe-gateway-update.shscript. - Anti-Loop Policy: If the script fails 3 times consecutively, it will create a
GATEWAY_LOCKOUTfile. If this file exists, STOP ALL OPERATIONS and wait for Kevin. Do not attempt to bypass the lockout. - Backup Awareness: The script maintains its own backups, but for critical changes, manually verify
~/.openclaw/openclaw.json.known-goodis up to date.
Usage
To update the gateway configuration:
- Prepare the new configuration JSON file (e.g., at
/tmp/new_config.json). - Execute the safety script:
[SKILL_PATH]/scripts/safe-gateway-update.sh /tmp/new_config.json [timeout_seconds] - The script will:
- Validate the JSON syntax.
- Backup the current config.
- Apply the new config and restart the gateway.
- Poll for a successful "RPC probe: ok" status.
- Roll back to the previous config if the health check fails or times out.
Authorship
Created by Kevin Smith & Rook (Orbit Smith), March 2026.