Gateway
The Gateway is the heart of OpenClaw — a single long-running process on your machine that routes messages between your AI model and any number of connected channels (Slack, Telegram, WhatsApp, Signal…). Everything goes through it.
AI Traffic Routing for Secure, Observable & Governed Environments
Description
The Gateway is the central process that makes OpenClaw work. It's a lightweight HTTP server that runs locally on your machine and acts as the bridge between every messaging platform you connect (Slack, Telegram, WhatsApp…) and the AI model of your choice.
When a message arrives from a channel, the Gateway receives it, finds or creates the right agent session for that conversation, forwards the message to the AI model, and routes the reply back to the channel. All of this happens in milliseconds, with no cloud service in the middle — your messages never leave your machine unless they're going directly to the AI provider's API.
The Gateway is stateful: it keeps track of all active sessions, connected channels, and queued messages. If a channel temporarily disconnects, the Gateway queues inbound messages and delivers them when the channel reconnects. If the Gateway itself restarts, sessions are restored from transcript files on disk.
By default it binds to localhost:3000 and requires no authentication — it's designed to run on a machine you control, not exposed to the internet. Use a reverse proxy with auth if you need remote access.
What it does
- •Starts a local HTTP server that all channels connect to.
- •Maintains agent sessions — each conversation gets its own isolated context.
- •Routes inbound messages to the right agent and sends replies back.
- •Survives channel disconnects; queues messages until the channel reconnects.
- •Exposes a status endpoint you can probe from monitoring tools.
CLI commands
Start the Gateway
openclaw gateway startStop the Gateway
openclaw gateway stopRestart (applies config changes)
openclaw gateway restartCheck status and connected channels
openclaw gateway statusView live logs
openclaw gateway logsChange the default port
openclaw config set gateway.port 3001Configuration tips
Default port is 3000
The Gateway binds to localhost:3000. Change with openclaw config set gateway.port <number> if the port is taken.
Auto-start on login (macOS)
Use launchd or add openclaw gateway start to your shell profile. On Linux, create a systemd unit. On Windows/WSL2, add it to ~/.bashrc.
Never expose publicly without auth
The Gateway has no built-in auth. Keep it on localhost unless you add a reverse proxy with authentication in front.