$ openclaw doctor
Troubleshooting

Gateway Won't Start: Quick Diagnostics and Fixes

Solve common gateway startup issues including 'set gateway.mode=local' errors, port conflicts, and service configuration problems. Complete troubleshooting guide.

OT
OPENCLAW.EXPERT TEAM
|JAN 5, 2025|7 MIN READ

Quick Diagnostics

Start with these commands to understand the issue:

# Check overall status
openclaw status

# Deep diagnostic with probes
openclaw status --deep

# Run repair checks
openclaw doctor

Common Issues and Fixes

"Gateway start blocked: set gateway.mode=local"

Cause: Your config exists but gateway.mode is not set.

Fix Option 1: Run the configuration wizard:

openclaw configure

Fix Option 2: Set directly:

openclaw config set gateway.mode local

Port 18789 Already in Use

Cause: Another process is using the gateway port.

Diagnose:

lsof -nP -iTCP:18789 -sTCP:LISTEN

Fix: Stop the conflicting process, or change the port:

openclaw config set gateway.port 18790

Service Running but Gateway Not Responding

Symptoms: openclaw gateway status shows "Runtime: running" but nothing works.

Check the logs:

# macOS
cat ~/Library/Logs/OpenClaw/gateway.log

# Linux
cat ~/.openclaw/logs/gateway.log

Common causes:

  • Config file differs between CLI and service

  • Service environment missing PATH entries

  • Last gateway error in logs
  • Fix: Reinstall the service:

    openclaw gateway install --force

    Config Validation Errors

    Cause: Malformed JSON in openclaw.json

    Diagnose:

    # Check config syntax
    cat ~/.openclaw/openclaw.json | jq .

    Common mistakes:

  • Missing commas between properties

  • Unescaped quotes in strings

  • Trailing commas (not allowed in JSON)
  • Service Environment Issues

    If commands work in terminal but fail when run by the service:

    Cause: The service runs with minimal PATH.

    Fix: Add paths to the service environment:

    {
    "tools": {
    "exec": {
    "pathPrepend": "/usr/local/bin:/opt/homebrew/bin"
    }
    }
    }

    Or set environment variables in ~/.openclaw/.env.

    Still Stuck?

    Contact our team for professional troubleshooting support.

    Need Professional OpenClaw Setup?

    Skip the technical hassle. Our expert team handles installation, configuration, and ongoing support so you can focus on what matters.

    Related Articles