Multiple gateways
기준일: 2026-07-26
공식 기준: Multiple gateways
Multiple gateways 문서는 OpenClaw 공식 문서(gateway/multiple-gateways)를 한국어로 정리한 가이드입니다. Run multiple OpenClaw Gateways on one host (isolation, ports, and profiles) 명령·설정 키·코드 예시는 공식 문서를 그대로 보존하며, 해석과 절차 안내는 한국어로 제공합니다. 최종 동작은 설치된 CLI 버전과 공식 원문을 확인하세요.
핵심 요약
Run multiple OpenClaw Gateways on one host (isolation, ports, and profiles)
한국어 가이드 범위: gateway/multiple-gateways 경로의 설정·명령·제약·예시를 학습용으로 재구성합니다.
문서 구성
공식 문서의 주요 섹션은 다음과 같습니다.
- Rescue-bot quickstart
- Rescue bot (separate Telegram bot, separate profile, port 19789)
- What --profile rescue onboard changes
- General multi-gateway setup
- main (default profile)
- extra gateway
- Isolation checklist
- Port mapping (derived)
- Browser/CDP notes (common footgun)
- Manual env example
- Quick checks
- 관련 문서
상세 내용
본문
Most setups need one Gateway - a single Gateway handles multiple messaging connections and agents. Run separate Gateways with isolated profiles/ports only when you need stronger isolation or redundancy (e.g., a rescue bot).
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
Rescue-bot quickstart
This keeps the rescue bot able to debug or apply config changes if the primary bot is down. Leave at least 20 ports between base ports so derived browser/CDP ports never collide.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- Keep the main bot on the default profile.
- Run the rescue bot on
--profile rescue, with its own Telegram bot token. - Put the rescue bot on a different base port, e.g.
19789.
Rescue bot (separate Telegram bot, separate profile, port 19789)
openclaw --profile rescue onboard openclaw --profile rescue gateway install --port 19789 ```
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- Use a separate Telegram bot token, dedicated to the rescue account (easy to keep operator-only, independent from the main bot's channel/app install, and a simple DM-based recovery path).
- Keep the
rescueprofile name. - Use a base port at least 20 higher than the main bot.
- Accept the default rescue workspace unless you already manage one yourself.
What --profile rescue onboard changes
--profile rescue onboard runs the normal onboarding flow but writes everything into a separate profile, so the rescue bot gets its own:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- Profile/config file
- State directory
- Workspace (default:
~/.openclaw/workspace-rescue) - Managed service name
- Base port (plus derived ports)
- Telegram bot token
General multi-gateway setup
The same isolation pattern works for any pair or group of Gateways on one host - give each extra Gateway its own named profile and base port:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
main (default profile)
openclaw setup openclaw gateway --port 18789
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
extra gateway
openclaw --profile ops setup openclaw --profile ops gateway --port 19789 bash openclaw --profile main setup openclaw --profile main gateway --port 18789
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
Named profiles on both sides also work:
Services follow the same pattern:
Isolation checklist
Sharing any of these causes config, state, or port conflicts. Gateway startup enforces unique state-directory ownership even when OPENCLAW_ALLOW_MULTI_GATEWAY=1 skips the per-config singleton.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
| Setting | Purpose |
|---|---|
OPENCLAW_CONFIG_PATH |
Per-instance config file |
OPENCLAW_STATE_DIR |
Per-instance sessions, creds, caches |
agents.defaults.workspace |
Per-instance workspace root |
gateway.port (or --port) |
Unique per instance |
| Derived browser/CDP ports | See below |
Port mapping (derived)
Base port = gateway.port (or OPENCLAW_GATEWAY_PORT / --port).
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- Browser control service port = base + 2 (loopback only).
- Canvas host is served on the Gateway HTTP server itself (same port as
gateway.port). - Browser profile CDP ports auto-allocate from
browser control port + 9through+ 108.
Browser/CDP notes (common footgun)
주요 항목:
- Do not pin
browser.cdpUrlto the same value on multiple instances. - Each instance needs its own browser control port and CDP range (derived from its gateway port).
- For explicit CDP ports, set
browser.profiles.<name>.cdpPortper instance. - For remote Chrome, use
browser.profiles.<name>.cdpUrl(per profile, per instance).
Manual env example
OPENCLAW_CONFIG_PATH=~/.openclaw/main.json \
OPENCLAW_STATE_DIR=~/.openclaw \
openclaw gateway --port 18789
OPENCLAW_CONFIG_PATH=~/.openclaw/rescue.json \
OPENCLAW_STATE_DIR=~/.openclaw-rescue \
openclaw gateway --port 19789
Quick checks
주요 항목:
gateway status --deepcatches stale launchd/systemd/schtasks services from older installs.gateway probewarning text such asmultiple reachable gateway identities detectedis expected only when you intentionally run more than one isolated gateway, or when OpenClaw cannot prove reachable probe targets are the same gateway. An SSH tunnel, proxy URL, or configured remote URL to the same gateway is one gateway with multiple transports, even when transport ports differ.
openclaw gateway status --deep
openclaw --profile rescue gateway status --deep
openclaw --profile rescue gateway probe
openclaw status
openclaw --profile rescue status
openclaw --profile rescue browser status
관련 문서
주요 항목:
- Gateway runbook
- Gateway lock
- Configuration
실습 체크리스트
- 공식 문서와 로컬 버전을 대조합니다:
https://docs.openclaw.ai/gateway/multiple-gateways - 관련 CLI는
openclaw --help및 하위 명령--help로 옵션을 확인합니다. - 설정 변경 시
openclaw config/openclaw doctor로 유효성을 검사합니다. - Gateway·채널·플러그인 변경 후에는 필요 시 Gateway를 재시작합니다.
자주 쓰는 명령·설정 예시
# Rescue bot (separate Telegram bot, separate profile, port 19789)
openclaw --profile rescue onboard
openclaw --profile rescue gateway install --port 19789
# main (default profile)
openclaw setup
openclaw gateway --port 18789
# extra gateway
openclaw --profile ops setup
openclaw --profile ops gateway --port 19789
openclaw --profile main setup
openclaw --profile main gateway --port 18789
openclaw --profile ops setup
openclaw --profile ops gateway --port 19789
openclaw gateway install
openclaw --profile ops gateway install --port 19789
OPENCLAW_CONFIG_PATH=~/.openclaw/main.json \
OPENCLAW_STATE_DIR=~/.openclaw \
openclaw gateway --port 18789
OPENCLAW_CONFIG_PATH=~/.openclaw/rescue.json \
OPENCLAW_STATE_DIR=~/.openclaw-rescue \
openclaw gateway --port 19789
openclaw gateway status --deep
openclaw --profile rescue gateway status --deep
openclaw --profile rescue gateway probe
openclaw status
openclaw --profile rescue status
openclaw --profile rescue browser status
관련 링크
이 가이드는 공식 문서를 한국어 학습용으로 재구성한 것입니다. 옵션 기본값·플래그 이름은 설치 버전에 따라 달라질 수 있습니다.