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.md
source 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

  1. 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.

  1. Re-stow config:
cd "$OPENCLAW_REPO" && stow --no-folding -t ~ .
  1. Restart gateway(s):

Multi-gateway mode (
MULTI_GATEWAY=true
)

If

$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
)

launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
  1. 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
  1. Verify channels connected:

    • Look for
      [telegram] [<agent>] starting provider
      lines (one per Telegram bot)
    • Look for
      [slack] socket mode connected
      lines
    • Check if WhatsApp is starting or in restart loop
    • Note the PID and port number
  2. 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