Bug Description
When gateway_mode is set to remote and remote_gateway_url is configured via the add-on UI, the startup script updates gateway.mode to remote in openclaw.json but does not write gateway.remote.url. This causes the gateway to fail with:
ERROR: gateway_mode=remote but gateway.remote.url is empty in openclaw config
ERROR: Configure gateway.remote.url first, then restart the add-on
Steps to Reproduce
- Install the add-on (v0.5.57)
- Set Gateway Mode to
remote
- Enter a valid Remote Gateway URL (e.g.,
ws://192.168.1.10:18789)
- Save and restart
Expected Behavior
The startup script should write gateway.remote.url (and ideally gateway.remote.token) to openclaw.json before launching the gateway, similar to how it writes gateway.mode.
Actual Behavior
Only gateway.mode: "remote" is written. gateway.remote.url remains empty in openclaw.json. The gateway refuses to start.
Workaround
Manually edit /config/.openclaw/openclaw.json via the web terminal:
jq '.gateway.remote = {"url": "ws://192.168.1.10:18789", "token": "YOUR_TOKEN"}' /config/.openclaw/openclaw.json > /tmp/oc.json && cp /tmp/oc.json /config/.openclaw/openclaw.json
However, this fix is overwritten on every restart because the startup script re-syncs settings from the add-on options and does not include remote.url.
Additional Issue
OPENCLAW_GATEWAY_TOKEN is blocked as a reserved environment variable in gateway_env_vars, so there is no way to set the remote gateway token via the UI either.
Environment
- Add-on version: 0.5.57
- HA OS: 15.1 (x86_64)
- Gateway mode: remote
Bug Description
When
gateway_modeis set toremoteandremote_gateway_urlis configured via the add-on UI, the startup script updatesgateway.modetoremoteinopenclaw.jsonbut does not writegateway.remote.url. This causes the gateway to fail with:Steps to Reproduce
remotews://192.168.1.10:18789)Expected Behavior
The startup script should write
gateway.remote.url(and ideallygateway.remote.token) toopenclaw.jsonbefore launching the gateway, similar to how it writesgateway.mode.Actual Behavior
Only
gateway.mode: "remote"is written.gateway.remote.urlremains empty inopenclaw.json. The gateway refuses to start.Workaround
Manually edit
/config/.openclaw/openclaw.jsonvia the web terminal:However, this fix is overwritten on every restart because the startup script re-syncs settings from the add-on options and does not include
remote.url.Additional Issue
OPENCLAW_GATEWAY_TOKENis blocked as a reserved environment variable ingateway_env_vars, so there is no way to set the remote gateway token via the UI either.Environment