Spaces:
Running
Running
Somrat Sorkar commited on
Commit ·
27165bb
1
Parent(s): 7e64775
Pre-create approved client entry to bypass pairing for Docker
Browse files
start.sh
CHANGED
|
@@ -241,6 +241,23 @@ echo "🚀 Launching OpenClaw gateway on port 7860..."
|
|
| 241 |
echo ""
|
| 242 |
# Set model via environment for the gateway
|
| 243 |
export LLM_MODEL="$LLM_MODEL"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
openclaw gateway run --port 7860 --bind lan --verbose 2>&1 | tee -a /home/node/.openclaw/gateway.log &
|
| 245 |
GATEWAY_PID=$!
|
| 246 |
|
|
|
|
| 241 |
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=$!
|
| 263 |
|