[
    {
        "role": "user",
        "content": "what%20is%20default%20port%20for%20open%20claw%3F"
    },
    {
        "role": "assistant",
        "content": "The default port for *OpenClaw*\u2019s Gateway (its main control plane) is **18789**. ([open-claw.bot](https://open-claw.bot/docs/help/faq/?utm_source=openai))\n\nHere are a few more relevant details about how that port is used and how it can be changed:\n\n- The Gateway binds by default to `127.0.0.1:18789` (i.e. localhost) for security. ([clawdocs.org](https://clawdocs.org/architecture/gateway/?utm_source=openai))  \n- Everything goes over that single port: WebSocket control messages, HTTP APIs, and the Control UI (dashboard) all share it. ([clawdocs.org](https://clawdocs.org/architecture/gateway/?utm_source=openai))  \n- If you need to, you can override the port using:  \n  1. The `--port` flag in the `openclaw gateway` CLI command ([docs.openclaw.ai](https://docs.openclaw.ai/cli?utm_source=openai))  \n  2. The `OPENCLAW_GATEWAY_PORT` environment variable ([open-claw.bot](https://open-claw.bot/docs/help/faq/?utm_source=openai))  \n  3. The `gateway.port` setting in the config file (e.g. `~/.openclaw/openclaw.json`) ([openclaw-ai.online](https://openclaw-ai.online/configuration/?utm_source=openai))  \n\nIf you want, I can also walk you through configuring a different port or exposing it securely over the network."
    }
]