OpenClawHomeAssistant icon indicating copy to clipboard operation
OpenClawHomeAssistant copied to clipboard

Remote mode: gateway.remote.url not propagated to openclaw.json on startup

Open genieyuan opened this issue 8 months ago • 1 comments

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

  1. Install the add-on (v0.5.57)
  2. Set Gateway Mode to remote
  3. Enter a valid Remote Gateway URL (e.g., ws://192.168.1.10:18789)
  4. 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

genieyuan avatar Mar 08 '26 11:03 genieyuan

Hey @genieyuan !

Please, update to latest release. It should solve the issue.

techartdev avatar Mar 10 '26 20:03 techartdev