Somrat Sorkar commited on
Commit
567a914
·
1 Parent(s): 27165bb

Pre-approve Control UI device in ~/.openclaw/devices/paired.json

Browse files
Files changed (1) hide show
  1. start.sh +13 -10
start.sh CHANGED
@@ -242,21 +242,24 @@ echo ""
242
  # Set model via environment for the gateway
243
  export LLM_MODEL="$LLM_MODEL"
244
 
245
- # For headless Docker: pre-create a client approval to bypass pairing prompt
246
- # This creates a fake "approved" client so the gateway thinks it's already paired
247
- mkdir -p /home/node/.openclaw/clients
248
- cat > /home/node/.openclaw/clients/approved.json <<'CLIENTEOF'
249
  {
250
- "clients": [
251
  {
252
- "id": "docker-webchat",
253
- "name": "Web Control UI",
254
- "kind": "control-ui",
255
- "approvedAt": "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
 
 
 
256
  }
257
  ]
258
  }
259
- CLIENTEOF
260
 
261
  openclaw gateway run --port 7860 --bind lan --verbose 2>&1 | tee -a /home/node/.openclaw/gateway.log &
262
  GATEWAY_PID=$!
 
242
  # Set model via environment for the gateway
243
  export LLM_MODEL="$LLM_MODEL"
244
 
245
+ # For headless Docker: pre-approve the Control UI device to bypass pairing
246
+ # Store approved device entry in ~/.openclaw/devices/paired.json
247
+ mkdir -p /home/node/.openclaw/devices
248
+ cat > /home/node/.openclaw/devices/paired.json <<'DEVICEEOF'
249
  {
250
+ "devices": [
251
  {
252
+ "id": "control-ui-docker",
253
+ "kind": "device",
254
+ "role": "control-ui",
255
+ "name": "HuggingClaw Control UI",
256
+ "approved": true,
257
+ "approvedAt": "2026-03-31T06:07:00.000Z",
258
+ "scopes": ["*"]
259
  }
260
  ]
261
  }
262
+ DEVICEEOF
263
 
264
  openclaw gateway run --port 7860 --bind lan --verbose 2>&1 | tee -a /home/node/.openclaw/gateway.log &
265
  GATEWAY_PID=$!