Multiple Gateways (same host)
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.Isolation checklist (required)
CLAWDIA_CONFIG_PATH— per-instance config fileCLAWDIA_STATE_DIR— per-instance sessions, creds, cachesagents.defaults.workspace— per-instance workspace rootgateway.port(or--port) — unique per instance- Derived ports (browser/canvas) must not overlap
Recommended: profiles (--profile)
Profiles auto-scope CLAWDIA_STATE_DIR + CLAWDIA_CONFIG_PATH and suffix service names.
Rescue-bot guide
Run a second Gateway on the same host with its own:- profile/config
- state dir
- workspace
- base port (plus derived ports)
How to install (rescue bot)
Port mapping (derived)
Base port =gateway.port (or CLAWDIA_GATEWAY_PORT / --port).
browser.controlUrl port = base + 2canvasHost.port = base + 4- Browser profile CDP ports auto-allocate from
browser.controlPort + 9 .. + 108
Browser/CDP notes (common footgun)
- Do not pin
browser.controlUrlorbrowser.cdpUrlto the same values on multiple instances. - Each instance needs its own browser control port and CDP range.
- If you need explicit CDP ports, set
browser.profiles.<name>.cdpPortper instance. - Remote Chrome: use
browser.profiles.<name>.cdpUrl(per profile, per instance).
