Summary
Setup should detect remote gateway mode and switch to manual remote guidance instead of local patch flow.
Problem
Setup patch logic assumes local access to ~/.openclaw/openclaw.json and local gateway files. In remote gateway deployments this is false and can produce confusing output.
Scope
- Detect local vs remote gateway mode from
GATEWAY_URL
- Skip local patch attempts in remote mode
- Print exact manual remote patch checklist:
gateway.controlUi.allowedOrigins
gateway.tools.allow
- pairing and scopes guidance
Acceptance criteria
- Setup clearly announces remote mode when gateway host is non-loopback
- No false success messages about local gateway patching in remote mode
- User receives explicit manual steps with concrete config keys
Test plan
- Run setup with loopback and non-loopback gateway URLs
- Verify mode-specific behavior and output
Implementation hints
scripts/setup.ts
scripts/lib/gateway-detect.ts
Summary
Setup should detect remote gateway mode and switch to manual remote guidance instead of local patch flow.
Problem
Setup patch logic assumes local access to
~/.openclaw/openclaw.jsonand local gateway files. In remote gateway deployments this is false and can produce confusing output.Scope
GATEWAY_URLgateway.controlUi.allowedOriginsgateway.tools.allowAcceptance criteria
Test plan
Implementation hints
scripts/setup.tsscripts/lib/gateway-detect.ts