多重 Gateways (同一主機)
大多數設定應使用單一 Gateway,因為單一 Gateway 即可處理多個訊息連線與 Agents。若您需要更強的隔離或冗餘 (例如:救援機器人 Rescue Bot),請使用隔離的 Profiles/Ports 運行分開的 Gateways。隔離檢查清單 (必要)
OPENCLAW_CONFIG_PATH— Per-instance 設定檔OPENCLAW_STATE_DIR— Per-instance Sessions, Creds, Cachesagents.defaults.workspace— Per-instance Workspace Rootgateway.port(或--port) — 每個 Instance 唯一- 推導的 Ports (Browser/Canvas) 絕不可重疊
推薦: Profiles (--profile)
Profiles 自動界定 (Scope) OPENCLAW_STATE_DIR + OPENCLAW_CONFIG_PATH 並為服務名稱加上後綴。
Rescue-bot 指南
在同一台主機上運行第二個 Gateway,擁有其自己的:- Profile/Config
- State Dir
- Workspace
- Base Port (加上 Derived Ports)
如何安裝 (Rescue Bot)
Port Mapping (Derived)
Base Port =gateway.port (或 OPENCLAW_GATEWAY_PORT / --port)。
- 瀏覽器控制服務連接埠 = Base + 2 (僅限 Loopback)
canvasHost.port = base + 4- Browser Profile CDP Ports 自動從
browser.controlPort + 9 .. + 108分配
Browser/CDP 註記 (常見陷阱)
- 不要 在多個 Instances 上將
browser.cdpUrl固定為相同數值。 - 每個 Instance 需要其自己的 Browser Control Port 與 CDP Range (從其 Gateway Port 推導)。
- 若您需要顯式 CDP Ports,請每個 Instance 設定
browser.profiles.<name>.cdpPort。 - Remote Chrome: 使用
browser.profiles.<name>.cdpUrl(Per profile, per instance)。