Gateway Configuration

Configure the OpenClaw Gateway — the central routing hub for all channels and agents.

Overview

The Gateway is the central component of OpenClaw. It manages connections to all channels, routes messages to agents, and handles session management.

Starting the Gateway

# Start as background daemon
openclaw gateway --daemon

# Start in foreground (for debugging)
openclaw gateway --port 18789

Configuration

The Gateway is configured in ~/.openclaw/openclaw.json:

{
  "gateway": {
    "port": 18789,
    "host": "127.0.0.1",
    "logLevel": "info"
  }
}

Key Options

OptionDescriptionDefault
portHTTP port for the Control UI and API18789
hostBind address127.0.0.1
logLevelLog verbosity (debug, info, warn, error)info

Gateway Management

# Check status
openclaw gateway status

# Stop the daemon
openclaw service stop

# Restart
openclaw service restart

# View logs
openclaw logs --follow

Remote Access

Via Tailscale

{
  "gateway": {
    "host": "0.0.0.0",
    "tailscale": true
  }
}

Via SSH Tunnel

ssh -L 18789:localhost:18789 user@remote-server

Control UI Dashboard

Access the dashboard at http://127.0.0.1:18789/:

openclaw dashboard

Next Steps