Buddy / start.sh
openclawbuddy's picture
Update start.sh
2379476 verified
Raw History Blame Contribute Delete
1.23 kB
#!/usr/bin/env sh
set -eu
export HOME=/home/node
export OPENCLAW_CONFIG_PATH=/home/node/.openclaw/openclaw.json
mkdir -p /home/node/.openclaw /home/node/.openclaw/workspace
cat > "$OPENCLAW_CONFIG_PATH" <<EOF
{
"gateway": {
"mode": "local",
"port": 7860,
"bind": "lan",
"trustedProxies": ["0.0.0.0/0"],
"auth": {
"mode": "token",
"token": "${OPENCLAW_GATEWAY_TOKEN}"
},
"controlUi": {
"allowedOrigins": [
"https://openclawbuddy-buddy.hf.space",
"http://localhost:7860",
"http://127.0.0.1:7860"
],
"allowInsecureAuth": true,
"dangerouslyDisableDeviceAuth": true
}
},
"agents": {
"defaults": {
"workspace": "/home/node/.openclaw/workspace",
"model": {
"primary": "groq/openai/gpt-oss-120b"
}
}
}
}
EOF
echo "=== active config path ==="
openclaw config file || true
echo "=== config contents ==="
cat "$OPENCLAW_CONFIG_PATH"
echo "========================"
exec openclaw gateway --token "${OPENCLAW_GATEWAY_TOKEN}"
```
HF secrets:
- `OPENCLAW_GATEWAY_TOKEN` ✅
- `GROQ_API_KEY` ✅
Push these 3 files, wait for build, then open:
```
https://openclawbuddy-buddy.hf.space?token=YOUR_TOKEN_HERE