Cc-openclaw openclaw-restart
Restart OpenClaw gateway(s) — handles stow conflicts and verifies channels reconnect. Supports single-gateway and multi-gateway (per-tier) deployments.
install
source · Clone the upstream repo
git clone https://github.com/rahulsub-be/cc-openclaw
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/rahulsub-be/cc-openclaw "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/openclaw-restart" ~/.claude/skills/rahulsub-be-cc-openclaw-openclaw-restart && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/rahulsub-be/cc-openclaw "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/.claude/skills/openclaw-restart" ~/.openclaw/skills/rahulsub-be-cc-openclaw-openclaw-restart && rm -rf "$T"
manifest:
.claude/skills/openclaw-restart/SKILL.mdsource content
Restart OpenClaw Gateway
Restart the gateway with automatic stow conflict resolution. Argument
$ARGUMENTS is the tier name to restart, or "all" to restart every tier. If empty, auto-detect deployment mode.
Setup Detection
OPENCLAW_REPO=$(readlink ~/.openclaw/openclaw.json 2>/dev/null | sed 's|/.openclaw/openclaw.json||') TIER_CONFIGS=(~/.openclaw/configs/openclaw-*.json) [[ -f "${TIER_CONFIGS[0]}" ]] && MULTI_GATEWAY=true || MULTI_GATEWAY=false
Steps
- Resolve stow conflicts:
rm -f ~/.openclaw/cron/jobs.json
The gateway overwrites
jobs.json as a real file on every startup, breaking the stow symlink.
- Re-stow config:
cd "$OPENCLAW_REPO" && stow --no-folding -t ~ .
- Restart gateway(s):
Multi-gateway mode (MULTI_GATEWAY=true
)
MULTI_GATEWAY=trueIf
$ARGUMENTS is a specific tier name:
launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway.$ARGUMENTS
If
$ARGUMENTS is "all" or empty:
for cfg in ~/.openclaw/configs/openclaw-*.json; do TIER=$(basename "$cfg" | sed 's/openclaw-//;s/.json//') launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway.$TIER done
Single-gateway mode (MULTI_GATEWAY=false
)
MULTI_GATEWAY=falselaunchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
- Wait for startup (5 seconds), then check logs:
Multi-gateway
sleep 5 for each restarted tier: tail -30 ~/.openclaw-$TIER/gateway.log
Single-gateway
sleep 5 && tail -30 ~/.openclaw/logs/gateway.log
-
Verify channels connected:
- Look for
lines (one per Telegram bot)[telegram] [<agent>] starting provider - Look for
lines[slack] socket mode connected - Check if WhatsApp is starting or in restart loop
- Note the PID and port number
- Look for
-
Report status to the user:
- Per tier (multi) or overall (single): PID, port, channel status
- Which Telegram bots started
- Slack connection status
- WhatsApp status (connected / restart loop / not configured)
- Any errors in the log