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
bashOPENCLAW_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:
bashrm -f ~/.openclaw/cron/jobs.json
The gateway overwrites jobs.json as a real file on every startup, breaking the stow symlink.
- Re-stow config:
bashcd "$OPENCLAW_REPO" && stow --no-folding -t ~ .
- Restart gateway(s):
Multi-gateway mode (MULTI_GATEWAY=true)
If $ARGUMENTS is a specific tier name:
bashlaunchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway.$ARGUMENTS
If $ARGUMENTS is "all" or empty:
bashfor 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)
bashlaunchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
- Wait for startup (5 seconds), then check logs:
Multi-gateway
bashsleep 5 for each restarted tier: tail -30 ~/.openclaw-$TIER/gateway.log
Single-gateway
bashsleep 5 && tail -30 ~/.openclaw/logs/gateway.log
-
Verify channels connected:
- Look for
[telegram] [<agent>] starting providerlines (one per Telegram bot) - Look for
[slack] socket mode connectedlines - 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


