Bug Summary
gateway.controlUi.dangerouslyDisableDeviceAuth: true makes the Control UI completely inaccessible through a reverse proxy (Caddy, Traefik, etc.) by nullifying the device identity instead of bypassing the device check.
Environment
- NemoClaw v0.1.0
- OpenClaw 2026.3.11 (29dc654)
- OpenShell v0.0.12
- Ubuntu 24.04 on Hostinger VPS
- Caddy v2.11.2 as reverse proxy
Steps to Reproduce
- Install NemoClaw, set up sandbox
- Configure Caddy to reverse proxy
yourdomain.com → 127.0.0.1:18789
- Set
gateway.controlUi.allowedOrigins to include your domain
- Set
gateway.controlUi.dangerouslyDisableDeviceAuth: true
- Set
gateway.controlUi.allowInsecureAuth: true
- Open
https://yourdomain.com in a browser
Expected: Browser connects, device auth is bypassed, token login screen appears.
Actual: Gateway rejects with code=1008 reason=device identity required. The token login screen never appears.
Root Cause
In gateway-cli-BjsM6fWb.js, the resolveControlUiAuthPolicy function (around line 22349):
function resolveControlUiAuthPolicy(params) {
const allowInsecureAuthConfigured = params.isControlUi && params.controlUiConfig?.allowInsecureAuth === true;
const dangerouslyDisableDeviceAuth = params.isControlUi && params.controlUiConfig?.dangerouslyDisableDeviceAuth === true;
return {
allowInsecureAuthConfigured,
dangerouslyDisableDeviceAuth,
allowBypass: dangerouslyDisableDeviceAuth,
device: dangerouslyDisableDeviceAuth ? null : params.deviceRaw // ← BUG
};
}
When dangerouslyDisableDeviceAuth is true, device is set to null. This makes hasDeviceIdentity evaluate to false downstream in evaluateMissingDeviceIdentity(), which then rejects with "device identity required".
The flag creates a catch-22:
dangerouslyDisableDeviceAuth: true → device set to null → "device identity required"
dangerouslyDisableDeviceAuth: false → device identity preserved but pairing enforced → "pairing required" (and openclaw devices approve fails with GatewayClientRequestError: unknown requestId)
Fix
Change line ~22357 from:
device: dangerouslyDisableDeviceAuth ? null : params.deviceRaw
To:
This preserves the device identity while still allowing allowBypass to skip the pairing check. After this patch, the browser successfully connects and the token login screen appears.
Additional Issues Found
openclaw devices approve <id> crashes with GatewayClientRequestError: unknown requestId — CLI device management is broken
openclaw gateway stop is the only way to stop the gateway — Ctrl+C doesn't work inside the sandbox
- Token must be passed via URL hash (
https://domain/#token=xxx), not query parameter — this is undocumented for remote access
Workaround
Patch the file manually inside the sandbox:
python3 -c "
path = '/usr/local/lib/node_modules/openclaw/dist/gateway-cli-BjsM6fWb.js'
with open(path, 'r') as f:
code = f.read()
code = code.replace(
'device: dangerouslyDisableDeviceAuth ? null : params.deviceRaw',
'device: params.deviceRaw'
)
with open(path, 'w') as f:
f.write(code)
print('Patched')
"
Then set config:
openclaw config set gateway.controlUi.dangerouslyDisableDeviceAuth true
openclaw config set gateway.controlUi.allowInsecureAuth true
openclaw config set gateway.controlUi.allowedOrigins '["https://yourdomain.com"]'
Restart the gateway and access via https://yourdomain.com/#token=YOUR_GATEWAY_TOKEN.
Bug Summary
gateway.controlUi.dangerouslyDisableDeviceAuth: truemakes the Control UI completely inaccessible through a reverse proxy (Caddy, Traefik, etc.) by nullifying the device identity instead of bypassing the device check.Environment
Steps to Reproduce
yourdomain.com→127.0.0.1:18789gateway.controlUi.allowedOriginsto include your domaingateway.controlUi.dangerouslyDisableDeviceAuth: truegateway.controlUi.allowInsecureAuth: truehttps://yourdomain.comin a browserExpected: Browser connects, device auth is bypassed, token login screen appears.
Actual: Gateway rejects with
code=1008 reason=device identity required. The token login screen never appears.Root Cause
In
gateway-cli-BjsM6fWb.js, theresolveControlUiAuthPolicyfunction (around line 22349):When
dangerouslyDisableDeviceAuthistrue,deviceis set tonull. This makeshasDeviceIdentityevaluate tofalsedownstream inevaluateMissingDeviceIdentity(), which then rejects with "device identity required".The flag creates a catch-22:
dangerouslyDisableDeviceAuth: true→ device set tonull→ "device identity required"dangerouslyDisableDeviceAuth: false→ device identity preserved but pairing enforced → "pairing required" (andopenclaw devices approvefails withGatewayClientRequestError: unknown requestId)Fix
Change line ~22357 from:
To:
This preserves the device identity while still allowing
allowBypassto skip the pairing check. After this patch, the browser successfully connects and the token login screen appears.Additional Issues Found
openclaw devices approve <id>crashes withGatewayClientRequestError: unknown requestId— CLI device management is brokenopenclaw gateway stopis the only way to stop the gateway —Ctrl+Cdoesn't work inside the sandboxhttps://domain/#token=xxx), not query parameter — this is undocumented for remote accessWorkaround
Patch the file manually inside the sandbox:
Then set config:
Restart the gateway and access via
https://yourdomain.com/#token=YOUR_GATEWAY_TOKEN.