Problem:openclaw command not found after installation.Fix:
# Find npm global bin pathnpm config get prefix# Add to PATH (replace with your prefix)echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrcsource ~/.bashrc# Or use npxnpx openclaw --version
Error: gateway.mode is unsetError: OPENCLAW_GATEWAY_TOKEN is required
Fix:
# Check configurationopenclaw doctor# Set gateway modeopenclaw config set gateway.mode local# Generate tokenopenclaw config set gateway.auth.token "$(openssl rand -hex 32)"# Start gatewayopenclaw gateway --bind loopback
Port already in use
Problem: Port 18789 already bound.Symptoms:
Error: listen EADDRINUSE: address already in use :::18789
Fix:
# Find process using portlsof -i :18789# ornetstat -tlnp | grep 18789# Kill existing processkill <PID># Or use different portopenclaw gateway --port 18790
Gateway not accessible remotely
Problem: Can’t connect to gateway from other devices.Fix:
# Check bind modeopenclaw config get gateway.bind# Set to LAN for network accessopenclaw config set gateway.bind lan# Ensure authentication is configuredopenclaw config set gateway.auth.token "$(openssl rand -hex 32)"# Check firewallsudo ufw allow 18789/tcp # Ubuntu/Debiansudo firewall-cmd --add-port=18789/tcp --permanent # RHEL/CentOS# Verify bindingnetstat -tlnp | grep 18789# Should show 0.0.0.0:18789, not 127.0.0.1:18789
Gateway crashes on startup
Problem: Gateway starts then immediately crashes.Debug:
Problem: QR code doesn’t appear or fails to scan.Fix:
# Clear WhatsApp staterm -rf ~/.openclaw/state/whatsapp/# Restart gatewayopenclaw gateway restart# Check for QR code in logsopenclaw gateway --verbose# Use web UI for easier QR scanningopen http://localhost:18789
Telegram bot not responding
Problem: Telegram bot doesn’t reply to messages.Debug:
# Check bot tokenopenclaw config get channels.telegram.botToken# Verify bot is runningopenclaw channels status# Check allowlistopenclaw config get channels.telegram.allowFrom# Approve pairingopenclaw pairing listopenclaw pairing approve telegram <code># Test botcurl https://api.telegram.org/bot<TOKEN>/getMe
Problem: Authentication fails when connecting to gateway.Symptoms:
Error: Unauthorized (401)Error: token_mismatch
Fix:
# Verify tokenopenclaw config get gateway.auth.tokenecho $OPENCLAW_GATEWAY_TOKEN# Regenerate tokenopenclaw config set gateway.auth.token "$(openssl rand -hex 32)"# Update environmentexport OPENCLAW_GATEWAY_TOKEN="$(openclaw config get gateway.auth.token)"# Restart gatewayopenclaw gateway restart
Rate limited
Problem: Too many failed authentication attempts.Symptoms:
Error: rate_limitedRetry after: 300000ms
Fix:
# Wait 5 minutes for lockout to expire# Or restart gateway to reset limiter (not recommended)openclaw gateway restart# Verify correct tokenopenclaw config get gateway.auth.token
Rate limiting config from src/gateway/auth-rate-limit.ts:
# Clear existing credentialsrm -rf ~/.openclaw/credentials/anthropic-*# Re-loginopenclaw login anthropic# Or use API keyopenclaw config set models.anthropic.apiKey sk-ant-...# Verify loginopenclaw config get models.anthropic
# Fix host directory permissions (container runs as UID 1000)sudo chown -R 1000:1000 ~/.openclaw# Or run as root (not recommended)docker run --user root openclaw:local
Can't connect to containerized gateway
Problem: Gateway unreachable from host.Fix:
# Ensure correct bind modedocker run \ -e OPENCLAW_GATEWAY_BIND=lan \ -p 18789:18789 \ openclaw:local node openclaw.mjs gateway --bind lan# Check port mappingdocker port openclaw-gateway# Test from inside containerdocker exec openclaw-gateway curl localhost:18789/health# Test from hostcurl localhost:18789/health
# View full configopenclaw config list# Validate configopenclaw doctor# Check specific valuesopenclaw config get gatewayopenclaw config get channelsopenclaw config get agents