Enabling Global Bind for OpenClaw Gateway | Generated by AI
Question: How do I change the OpenClaw gateway config from “loopback” (127.0.0.1) to bind globally (0.0.0.0) so it’s accessible via 192.168.1.36:18789?
Answer:
Simple Config Change
Just change two fields in your config:
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"auth": {
"mode": "token",
"token": "86c230696f27eada444097a03167fca718b3321b3d52c117"
}
}
Change to:
"gateway": {
"port": 18789,
"mode": "local",
"bind": "all",
"auth": {
"mode": "token",
"token": "86c230696f27eada444097a03167fca718b3321b3d52c117"
}
}
What Changed
| Field | Before | After | Meaning |
|---|---|---|---|
bind |
"loopback" |
"all" |
Listen on 0.0.0.0 instead of 127.0.0.1 |
The typical values are
loopback→ binds to127.0.0.1only, andall→ binds to0.0.0.0(all interfaces). Some configs useglobalinstead ofall— check OpenClaw’s own documentation ifalldoesn’t work.
After Changing
- Save the config file
- Restart the OpenClaw service:
systemctl restart openclaw # or pkill openclaw && openclaw & - Verify it’s now listening on all interfaces:
ss -tlnp | grep 18789 # Should show: 0.0.0.0:18789 (not 127.0.0.1:18789) - Allow firewall if needed:
sudo ufw allow 18789 - Access from your browser:
http://192.168.1.36:18789
Security Note
⚠️ Since your config already has token auth enabled ("mode": "token"), you are protected — any request must include the token. This is fine for LAN use, but do not expose port 18789 to the public internet without additional firewall rules.