> ## Documentation Index
> Fetch the complete documentation index at: https://openclaw.veiseule.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# एकाधिक Gateway

# एकाधिक Gateway (एक ही होस्ट)

46. अधिकांश सेटअप में एक Gateway का उपयोग करना चाहिए क्योंकि एक ही Gateway कई messaging connections और agents संभाल सकता है। 47. यदि आपको अधिक isolation या redundancy (जैसे, rescue bot) चाहिए, तो isolated profiles/ports के साथ अलग-अलग Gateways चलाएँ।

## आइसोलेशन चेकलिस्ट (आवश्यक)

* `OPENCLAW_CONFIG_PATH` — प्रति-इंस्टेंस विन्यास फ़ाइल
* `OPENCLAW_STATE_DIR` — प्रति-इंस्टेंस सत्र, क्रेडेंशियल्स, कैश
* `agents.defaults.workspace` — प्रति-इंस्टेंस वर्कस्पेस रूट
* `gateway.port` (या `--port`) — प्रत्येक इंस्टेंस के लिए अद्वितीय
* व्युत्पन्न पोर्ट्स (ब्राउज़र/कैनवास) ओवरलैप नहीं होने चाहिए

यदि ये साझा किए जाते हैं, तो आपको विन्यास रेस और पोर्ट टकराव का सामना करना पड़ेगा।

## अनुशंसित: प्रोफाइल (`--profile`)

प्रोफाइल स्वतः `OPENCLAW_STATE_DIR` + `OPENCLAW_CONFIG_PATH` को स्कोप करते हैं और सेवा नामों में प्रत्यय जोड़ते हैं।

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
# main
openclaw --profile main setup
openclaw --profile main gateway --port 18789

# rescue
openclaw --profile rescue setup
openclaw --profile rescue gateway --port 19001
```

प्रति-प्रोफाइल सेवाएँ:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw --profile main gateway install
openclaw --profile rescue gateway install
```

## रेस्क्यू-बॉट गाइड

उसी होस्ट पर एक दूसरा Gateway उसके अपने निम्नलिखित के साथ चलाएँ:

* प्रोफाइल/विन्यास
* स्टेट डायरेक्टरी
* वर्कस्पेस
* बेस पोर्ट (साथ में व्युत्पन्न पोर्ट्स)

यह रेस्क्यू बॉट को मुख्य बॉट से अलग रखता है ताकि प्राथमिक बॉट डाउन होने पर यह डिबग कर सके या विन्यास परिवर्तन लागू कर सके।

पोर्ट स्पेसिंग: बेस पोर्ट्स के बीच कम से कम 20 पोर्ट का अंतर रखें ताकि व्युत्पन्न ब्राउज़र/कैनवास/CDP पोर्ट्स कभी टकराएँ नहीं।

### कैसे इंस्टॉल करें (रेस्क्यू बॉट)

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
# Main bot (existing or fresh, without --profile param)
# Runs on port 18789 + Chrome CDC/Canvas/... Ports
openclaw onboard
openclaw gateway install

# Rescue bot (isolated profile + ports)
openclaw --profile rescue onboard
# Notes:
# - workspace name will be postfixed with -rescue per default
# - Port should be at least 18789 + 20 Ports,
#   better choose completely different base port, like 19789,
# - rest of the onboarding is the same as normal

# To install the service (if not happened automatically during onboarding)
openclaw --profile rescue gateway install
```

## पोर्ट मैपिंग (व्युत्पन्न)

बेस पोर्ट = `gateway.port` (या `OPENCLAW_GATEWAY_PORT` / `--port`)।

* ब्राउज़र कंट्रोल सेवा पोर्ट = बेस + 2 (केवल loopback)
* `canvasHost.port = base + 4`
* 48. Browser profile CDP ports `browser.controlPort + 9 .. 49. + 108` से अपने-आप allocate होते हैं।

यदि आप इनमें से किसी को भी विन्यास या पर्यावरण चर में ओवरराइड करते हैं, तो आपको प्रत्येक इंस्टेंस के लिए इन्हें अद्वितीय रखना होगा।

## ब्राउज़र/CDP नोट्स (सामान्य गलती)

* कई इंस्टेंस पर `browser.cdpUrl` को एक ही मान पर **पिन न करें**।
* प्रत्येक इंस्टेंस को अपना स्वयं का ब्राउज़र कंट्रोल पोर्ट और CDP रेंज चाहिए (जो उसके Gateway पोर्ट से व्युत्पन्न होती है)।
* 50. यदि आपको explicit CDP ports चाहिए, तो `browser.profiles.<name>` सेट करेंप्रति इंस्टेंस `.cdpPort`।
* Remote Chrome: `browser.profiles.<name>` का उपयोग करें`.cdpUrl` (प्रति प्रोफ़ाइल, प्रति इंस्टेंस)।

## मैनुअल env उदाहरण

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
OPENCLAW_CONFIG_PATH=~/.openclaw/main.json \
OPENCLAW_STATE_DIR=~/.openclaw-main \
openclaw gateway --port 18789

OPENCLAW_CONFIG_PATH=~/.openclaw/rescue.json \
OPENCLAW_STATE_DIR=~/.openclaw-rescue \
openclaw gateway --port 19001
```

## त्वरित जाँच

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw --profile main status
openclaw --profile rescue status
openclaw --profile rescue browser status
```
