---
summary: "OpenClaw Gateway CLI (`openclaw gateway`) — run, query, and discover gateways"
read_when:
- Running the Gateway from the CLI (dev or servers)
- Debugging Gateway auth, bind modes, and connectivity
- Discovering gateways via Bonjour (local + wide-area DNS-SD)
- Integrating an external Gateway process supervisor
title: "Gateway"
sidebarTitle: "Gateway"
---
The Gateway is OpenClaw's WebSocket server (channels, nodes, sessions, hooks). All subcommands on the pages listed here live under `openclaw gateway ...`.
`openclaw daemon ...` is a legacy alias for the service-control subcommands; see [`openclaw daemon`](/cli/daemon).
Local mDNS + wide-area DNS-SD setup.
How OpenClaw advertises and finds gateways.
Top-level gateway config keys.
## Gateway CLI pages
This page is an index. Five pages document `openclaw gateway`, one per reader
job. Open the page that matches your task.
| Page | Read it when |
| --------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [Run the Gateway](/cli/gateway/running) | You are starting the Gateway, tuning its run options, or reading its shared token. |
| [Restart and supervision](/cli/gateway/restart-and-supervision) | You are restarting the Gateway, or an external supervisor owns its lifecycle. |
| [Query a running Gateway](/cli/gateway/query) | You want health, status, stability, diagnostics, or a direct RPC call. |
| [Manage the Gateway service](/cli/gateway/service) | You are installing, starting, stopping, or repairing the native service. |
| [Discover gateways (Bonjour)](/cli/gateway/discovery) | You are looking for gateways over mDNS or wide-area DNS-SD. |
`openclaw gateway install` installs and starts the service. `--force` reinstalls an existing install and may restart a running Gateway. Finish offline configuration and runtime repairs before installation.
## Where each section moved
Every anchor from the previous single-page version still resolves here, so an
existing link such as `/cli/gateway#manage-the-gateway-service` keeps working.
Each entry points at the page that now holds the content.
- [Run the Gateway](/cli/gateway/running#run-the-gateway)
- [Options](/cli/gateway/running#options)
- [Reveal the configured token](/cli/gateway/running#reveal-the-configured-token)
- [Restart the Gateway](/cli/gateway/restart-and-supervision#restart-the-gateway)
- [Install identity](/cli/gateway/restart-and-supervision#install-identity)
- [External supervisors](/cli/gateway/restart-and-supervision#external-supervisors)
- [Gateway profiling](/cli/gateway/restart-and-supervision#gateway-profiling)
- [Query a running Gateway](/cli/gateway/query#query-a-running-gateway)
- [`gateway health`](/cli/gateway/query#gateway-health)
- [`gateway usage-cost`](/cli/gateway/query#gateway-usage-cost)
- [`gateway stability`](/cli/gateway/query#gateway-stability)
- [`gateway diagnostics export`](/cli/gateway/query#gateway-diagnostics-export)
- [`gateway status`](/cli/gateway/query#gateway-status)
- [`gateway probe`](/cli/gateway/query#gateway-probe)
- [Remote over SSH (Mac app parity)](/cli/gateway/query#remote-over-ssh-%28mac-app-parity%29)
- [`gateway call `](/cli/gateway/query#gateway-call-%3Cmethod%3E)
- [`gateway suspend`](/cli/gateway/query#gateway-suspend)
- [`gateway resume `](/cli/gateway/query#gateway-resume-%3Csuspensionid%3E)
- [Manage the Gateway service](/cli/gateway/service#manage-the-gateway-service)
- [Recover an unreadable native service definition](/cli/gateway/service#recover-an-unreadable-native-service-definition)
- [Lifecycle requests from Gateway chat](/cli/gateway/service#lifecycle-requests-from-gateway-chat)
- [Install with a wrapper](/cli/gateway/service#install-with-a-wrapper)
- [Discover gateways (Bonjour)](/cli/gateway/discovery#discover-gateways-%28bonjour%29)
- [`gateway discover`](/cli/gateway/discovery#gateway-discover)
- [Remote over SSH (Mac app parity)](/cli/gateway/query#remote-over-ssh-mac-app-parity)
- [`gateway call `](/cli/gateway/query#gateway-call-%3Cmethod%3E)
- [`gateway resume `](/cli/gateway/query#gateway-resume-%3Csuspensionid%3E)
- [Discover gateways (Bonjour)](/cli/gateway/discovery#discover-gateways-bonjour)
Option, tab, and panel anchors:
- [Startup behavior](/cli/gateway/running#startup-behavior)
- [`--port`](/cli/gateway/running#param-port)
- [`--bind`](/cli/gateway/running#param-bind)
- [`--token`](/cli/gateway/running#param-token)
- [`--auth`](/cli/gateway/running#param-auth)
- [`--password`](/cli/gateway/running#param-password)
- [`--tailscale`](/cli/gateway/running#param-tailscale)
- [`--allow-unconfigured`](/cli/gateway/running#param-allow-unconfigured)
- [`--dev`](/cli/gateway/running#param-dev)
- [`--ambient-channels`](/cli/gateway/running#param-ambient-channels)
- [`--dev-ambient-channels`](/cli/gateway/running#param-dev-ambient-channels)
- [`--reset`](/cli/gateway/running#param-reset)
- [`--force`](/cli/gateway/running#param-force)
- [`--verbose`](/cli/gateway/running#param-verbose)
- [`--cli-backend-logs`](/cli/gateway/running#param-cli-backend-logs)
- [`--ws-log`](/cli/gateway/running#param-ws-log)
- [`--compact`](/cli/gateway/running#param-compact)
- [`--raw-stream`](/cli/gateway/running#param-raw-stream)
- [Output modes](/cli/gateway/query#output-modes)
- [Shared options](/cli/gateway/query#shared-options)
- [`--port`](/cli/gateway/query#param-port)
- [`--days`](/cli/gateway/query#param-days)
- [`--agent`](/cli/gateway/query#param-agent)
- [`--all-agents`](/cli/gateway/query#param-all-agents)
- [`--limit`](/cli/gateway/query#param-limit)
- [`--type`](/cli/gateway/query#param-type)
- [`--since-seq`](/cli/gateway/query#param-since-seq)
- [`--bundle`](/cli/gateway/query#param-bundle-path)
- [`--export`](/cli/gateway/query#param-export)
- [Privacy and bundle behavior](/cli/gateway/query#privacy-and-bundle-behavior)
- [`--log-lines`](/cli/gateway/query#param-log-lines)
- [`--log-bytes`](/cli/gateway/query#param-log-bytes)
- [`--url`](/cli/gateway/query#param-url)
- [`--token`](/cli/gateway/query#param-token)
- [`--password`](/cli/gateway/query#param-password)
- [`--timeout`](/cli/gateway/query#param-timeout)
- [`--no-stability-bundle`](/cli/gateway/query#param-no-stability-bundle)
- [`--json`](/cli/gateway/query#param-json)
- [`--url`](/cli/gateway/query#param-url-1)
- [`--port`](/cli/gateway/query#param-port-1)
- [`--token`](/cli/gateway/query#param-token-1)
- [`--password`](/cli/gateway/query#param-password-1)
- [`--timeout`](/cli/gateway/query#param-timeout-1)
- [`--no-probe`](/cli/gateway/query#param-no-probe)
- [`--deep`](/cli/gateway/query#param-deep)
- [`--require-rpc`](/cli/gateway/query#param-require-rpc)
- [Status semantics](/cli/gateway/query#status-semantics)
- [Linux systemd auth-drift checks](/cli/gateway/query#linux-systemd-auth-drift-checks)
- [`--port`](/cli/gateway/query#param-port-2)
- [Interpretation](/cli/gateway/query#interpretation)
- [JSON output](/cli/gateway/query#json-output)
- [Common warning codes](/cli/gateway/query#common-warning-codes)
- [`--ssh`](/cli/gateway/query#param-ssh)
- [`--ssh-auto`](/cli/gateway/query#param-ssh-auto)
- [`--params`](/cli/gateway/query#param-params)
- [`--url`](/cli/gateway/query#param-url-2)
- [`--port`](/cli/gateway/query#param-port-3)
- [`--token`](/cli/gateway/query#param-token-2)
- [`--password`](/cli/gateway/query#param-password-2)
- [`--timeout`](/cli/gateway/query#param-timeout-2)
- [`--expect-final`](/cli/gateway/query#param-expect-final)
- [`--json`](/cli/gateway/query#param-json-1)
- [Command options](/cli/gateway/service#command-options)
- [Service runtime](/cli/gateway/service#service-runtime)
- [Lifecycle behavior](/cli/gateway/service#lifecycle-behavior)
- [Managed Gateway heap sizing](/cli/gateway/service#managed-gateway-heap-sizing)
- [Auth and SecretRefs at install time](/cli/gateway/service#auth-and-secretrefs-at-install-time)
- [`--timeout`](/cli/gateway/discovery#param-timeout)
- [`--json`](/cli/gateway/discovery#param-json)
## Related
- [CLI reference](/cli)
- [Gateway runbook](/gateway)