Most setups should use one Gateway because a single Gateway can handle multiple messaging connections and agents. If you need stronger isolation or redundancy (e.g., a rescue bot), run separate Gateways with isolated profiles/ports.Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
Best recommended setup
For most users, the simplest rescue-bot setup is:- keep the main bot on the default profile
- run the rescue bot on
--profile rescue - use a completely separate Telegram bot for the rescue account
- keep the rescue bot on a different base port such as
19789
Rescue-Bot Quickstart
Use this as the default path unless you have a strong reason to do something else:openclaw --profile rescue onboard:
- use the separate Telegram bot token
- keep the
rescueprofile - use a base port at least 20 higher than the main bot
- accept the default rescue workspace unless you already manage one yourself
gateway install is not needed.
Why this works
The rescue bot stays independent because it has its own:- profile/config
- state directory
- workspace
- base port (plus derived ports)
- Telegram bot token
- easy to keep operator-only
- separate bot token and identity
- independent from the main bot’s channel/app install
- simple DM-based recovery path when the main bot is broken
What --profile rescue onboard Changes
openclaw --profile rescue onboard uses the normal onboarding flow, but it
writes everything into a separate profile.
In practice, that means the rescue bot gets its own:
- config file
- state directory
- workspace (by default
~/.openclaw/workspace-rescue) - managed service name
General multi-gateway setup
The rescue-bot layout above is the easiest default, but the same isolation pattern works for any pair or group of Gateways on one host. For a more general setup, give each extra Gateway its own named profile and its own base port:Isolation checklist
Keep these unique per Gateway instance:OPENCLAW_CONFIG_PATH— per-instance config fileOPENCLAW_STATE_DIR— per-instance sessions, creds, cachesagents.defaults.workspace— per-instance workspace rootgateway.port(or--port) — unique per instance- derived browser/canvas/CDP ports
Port mapping (derived)
Base port =gateway.port (or OPENCLAW_GATEWAY_PORT / --port).
- browser control service port = base + 2 (loopback only)
- canvas host is served on the Gateway HTTP server (same port as
gateway.port) - Browser profile CDP ports auto-allocate from
browser.controlPort + 9 .. + 108
Browser/CDP notes (common footgun)
- Do not pin
browser.cdpUrlto the same values on multiple instances. - Each instance needs its own browser control port and CDP range (derived from its gateway port).
- If you need explicit CDP ports, set
browser.profiles.<name>.cdpPortper instance. - Remote Chrome: use
browser.profiles.<name>.cdpUrl(per profile, per instance).
Manual env example
Quick checks
gateway status --deephelps catch stale launchd/systemd/schtasks services from older installs.gateway probewarning text such asmultiple reachable gateways detectedis expected only when you intentionally run more than one isolated gateway.