
ဒါရှ်ဘုတ် ပြဿနာရှာဖွေရန် — OpenClaw ရဲ့ ဂိတ်ဝေး အလုပ်လက်ခံနေသော်လည်း ပြောင်လွင်သော စာမျက်နှာ၊ ချိတ်ဆက်မှု ပယ်ချခြင်း သို့မဟုတ် "ခွင့်ပြုခြင်းမရှိ" အမှားများကို ကြည့်နေရင်၊ ကျွန်တော်လဲ ကြုံဖူးပါတယ်။
ပြီးခဲ့တဲ့ အပတ်မှာ ကျွန်တော့်ဟာ ဒီပြဿနာကို Mac ပေါ်မှာ ဒေသခံ ဖွံ့ဖြိုးမှု၊ Ubuntu ပေါ်မှာ Docker၊ nginx reverse proxy၊ နဲ့ Tailscale ဖွင့်ထားသော အင်စတင်စစ်တစ်ခုအတွင်း နောက်ပြန်ပြင်ဆင်ခဲ့တယ်။ တစ်ခုချင်းစီမှာ ကွဲပြားခြားနားတဲ့ အဆင်မပြေမှုရှိသော်လည်း အားလုံးမှာ အဓိက အကြောင်းရင်း ၅ ခုကို ရှာတွေ့ခဲ့ပါတယ်။
HTML က တင်ပါတယ်။ DevTools က WebSocket လက်ဆောင်ပြင်ပေးမှု မအောင်မြင်မှုကို ပြပါတယ်။ Gateway မှတ်တမ်းတွေက အသုံးဝင်တဲ့အရာ မရှိပါဘူး။ အဲဒါဟာ အခွင့်ပြုချက်၊ ကွန်ရက် သို့မဟုတ် အဆင့်တက်ခြင်း ဖြစ်လို့ မသေချာဖြစ်နေပါဘူး။
အမှန်တကယ် ဘာပျက်နေသလဲဆိုတော့: သင့် proxy မှာ WebSocket အဆင့်မြှင့်ခြင်းခေါင်းစီးများ လွတ်နေခြင်း၊ Docker NAT က localhost ကို ပြင်ပအဖြစ် ဆက်ဆံနေခြင်း၊ သေသေချာချာ localStorage မှာ အခွင့်ပြုချက် token မရှိနေခြင်း သို့မဟုတ် အဟောင်း Clawdbot/Moltbot ဝန်ဆောင်မှုများက ဆိပ်ကမ်း တိုက်ဆိုင်မှု ဖြစ်ပါသည်။
ဒီလမ်းညွှန်ချက်က ကျွန်တော်တွေ့ပြီးပြီဆိုရင် တီထွင်ထားတဲ့ ပြဿနာရှာဖွေရန် လမ်းလျှောက်ချက်ကို လမ်းပြပေးပါတယ်။ ဒီမှာ စတင်ပြီး စစ်ဆေးချက်တွေကို လိုက်နာပါ၊ နောက်တော့ ဒါရှ်ဘုတ်ကို အလုပ်လုပ်စေမှာ သို့မဟုတ် အကြောင်းအရာကို အတိအကျ ပြောပြနိုင်လိမ့်မယ်။

Before diving into proxies and ports, verify the gateway is actually functional.
# Check gateway status
openclaw status
# If using systemd
systemctl --user status openclaw-gateway
# Docker users
docker ps | grep openclaw-gateway
What you're looking for:
running or activeIf it's not running or restarting constantly, stop here and fix the gateway install issues first.
Test the WebSocket endpoint directly:
# Install wscat if you don't have it
npm install -g wscat
# Test connection (replace with your actual token)
wscat -c "ws://127.0.0.1:18789/?token=YOUR_TOKEN_HERE"
Possible outcomes:
If wscat connects but the browser doesn't, the issue is either CORS, proxy config, or browser security policy.
Look at recent logs:
# View last 50 log lines
openclaw logs --limit 50
# Docker
docker logs openclaw-gateway --tail 50
# Look for WebSocket handshake attempts
openclaw logs | grep -E 'ws\]|websocket|handshake'
Key patterns:
[ws] accepted → Connection succeeded[ws] closed before connect ... code=1008 reason=pairing required → Auth mismatch[ws] closed before connect ... code=1008 reason=unauthorized: gateway token missing → Token not reaching gatewayOrigin http://... is not allowed → CORS issueSymptom: Gateway runs fine via CLI, but browser can't connect to 127.0.0.1:18789.
Cause: Gateway bound to a Tailscale IP, VPN interface, or external IP instead of loopback.
This is Issue #1380 — when Tailscale is active, the gateway sometimes binds to 100.x.x.x instead of 127.0.0.1. Browser WebSocket connections to Tailscale IPs fail.
Diagnose:
# Check what interface the gateway bound to
openclaw status
# Or inspect the actual listening socket
sudo lsof -i :18789
# Look at the "NAME" column - should show 127.0.0.1:18789
Fix:
Force loopback binding in config (~/.openclaw/config.json):
{
"gateway": {
"bind": "loopback",
"port": 18789
}
}
Valid bind options:
loopback → 127.0.0.1 only (default, safest)lan → 0.0.0.0 (all interfaces, requires auth)tailnet → Tailscale IPAfter changing bind, restart:
systemctl --user restart openclaw-gateway
# or
docker compose restart openclaw-gateway
Symptom: Gateway won't start, logs show EADDRINUSE.
Cause: Old Clawdbot/Moltbot gateway still running, or another service using 18789.
Diagnose:
# Find what's using the port
sudo lsof -i :18789
# Or
sudo ss -tlnp | grep 18789
Fix Option A: Stop Conflicting Service
# Stop old Clawdbot
systemctl --user stop clawdbot-gateway
# Kill the process if needed
sudo kill -9 <PID>
Fix Option B: Change OpenClaw Port
In ~/.openclaw/config.json:
{
"gateway": {
"port": 18790
}
}
Update Docker compose if using containers:
ports:
- "127.0.0.1:18790:18790"
Then access dashboard at http://127.0.0.1:18790/.
Symptom: Running gateway in Docker Desktop on Windows/Mac, browser shows "pairing required" even with correct token.
Cause: Docker's NAT networking makes the gateway see connections from 172.18.0.1 instead of 127.0.0.1. Gateway treats this as an external connection requiring node pairing.
Diagnose:
Check gateway logs for:
[ws] closed before connect conn=... remote=172.18.0.1 ... code=1008 reason=pairing required
If you see remote=172.18.0.1 but you're connecting from 127.0.0.1, this is the issue.
Fix:
Add trusted proxies to your config:
{
"gateway": {
"trustedProxies": ["172.18.0.0/16", "172.17.0.0/16"]
}
}
Or run gateway with --bind lan and enforce token auth:
{
"gateway": {
"bind": "lan",
"auth": {
"mode": "token",
"token": "your-secret-token"
}
}
}
Better fix for Windows/Mac: Run gateway natively instead of in Docker to get real localhost connections.
If you're exposing OpenClaw through nginx, Caddy, or another reverse proxy, WebSocket support needs explicit configuration.
The dashboard uses WebSockets for real-time communication. Standard HTTP proxying breaks this.
Minimal working config:
server {
listen 443 ssl;
server_name openclaw.yourdomain.com;
# SSL certs
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://127.0.0.1:18789;
# Critical for WebSockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Pass through client info
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket timeouts
proxy_read_timeout 86400;
proxy_send_timeout 86400;
}
}
Common nginx mistakes:
proxy_http_version 1.1 → WebSocket upgrade failsUpgrade and Connection headers → Handshake rejectedDetailed nginx reverse proxy guide: nginx WebSocket proxying
Caddy handles WebSockets automatically, but you still need proper config:
openclaw.yourdomain.com {
reverse_proxy 127.0.0.1:18789
}
That's it. Caddy auto-detects the WebSocket upgrade and adjusts timeouts.
If using subpath:
yourdomain.com {
reverse_proxy /openclaw/* 127.0.0.1:18789
}
Then access via https://yourdomain.com/openclaw/.
Debugging Caddy WebSocket issues:
Enable verbose logging:
openclaw.yourdomain.com {
log {
output file /var/log/caddy/openclaw.log
level DEBUG
}
reverse_proxy 127.0.0.1:18789
}
Check for websocket upgrade in logs. If missing, Caddy isn't detecting the upgrade request.
Less common but occasionally used:
<VirtualHost *:443>
ServerName openclaw.yourdomain.com
SSLEngine On
SSLCertificateFile /path/to/cert.pem
SSLCertificateKeyFile /path/to/key.pem
# Enable proxy modules
# a2enmod proxy proxy_http proxy_wstunnel rewrite
ProxyPreserveHost On
# WebSocket tunnel
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:18789/$1 [P,L]
# Regular HTTP proxy
ProxyPass / http://127.0.0.1:18789/
ProxyPassReverse / http://127.0.0.1:18789/
</VirtualHost>
Enable required modules:
sudo a2enmod proxy proxy_http proxy_wstunnel rewrite
sudo systemctl restart apache2
Symptom: Dashboard loads over HTTPS but WebSocket connection fails with mixed content error.
Cause: Browser blocks ws:// (non-secure WebSocket) when page is loaded over https://.
Fix:
Use wss:// (WebSocket Secure) behind your reverse proxy.
Your nginx/Caddy terminates SSL and forwards to http://127.0.0.1:18789, but the browser needs to connect via wss://.
Example flow:
wss://openclaw.yourdomain.com/ → nginx with SSLws://127.0.0.1:18789/ → gateway (local, no SSL needed)The dashboard auto-detects this if you access it via HTTPS URL.
Symptom: Browser console shows CORS policy: No 'Access-Control-Allow-Origin' header.
Cause: Accessing dashboard from a different domain than the gateway expects.
Context: As of OpenClaw's security updates, the Control UI has stricter origin validation.
Fix:
If your dashboard is at https://openclaw.example.com but gateway config doesn't know about it:
{
"gateway": {
"cors": {
"origins": ["https://openclaw.example.com"]
}
}
}
Security note: Don't use "origins": ["*"] in production. This exposes your gateway to external access vulnerabilities.
Symptom: Dashboard keeps asking for token every time you reload.
Cause: Browser's localStorage API blocked or cleared.
Diagnose:
Open DevTools → Application → Local Storage → http://127.0.0.1:18789
Look for key: openclaw-gateway-token
If missing after login, check:
Workaround:
Use the tokenized URL every time:
openclaw dashboard
This command outputs a URL with ?token=... appended. The UI strips it after first load and saves to localStorage — but if that fails, you need the URL each time.

If none of the above fixes work, you're in edge case territory. Before opening a GitHub issue, collect these logs:
# Last 100 lines with timestamps
openclaw logs --limit 100 > gateway-logs.txt
# Docker
docker logs openclaw-gateway --tail 100 > gateway-logs.txt
browser-console.txt# Export config (redact tokens)
cat ~/.openclaw/config.json | sed 's/"token": ".*"/"token": "REDACTED"/g' > config-sanitized.json
# Check firewall rules (Linux)
sudo iptables -L -n | grep 18789
# Check what's binding to the port
sudo lsof -i :18789
# Test from external host if relevant
curl -v http://your-server-ip:18789/

ပတ်ဝန်းကျင်အမျိုးမျိုးမှာ ဒီပြဿနာတွေကို ပြင်ပြီးတော့ရင်၊ အောက်ပါပျက်ကွက်မှုဖြန့်ဖြူးမှုကို တွေ့ခဲ့ပါတယ်။
၆၀% - Reverse proxy WebSocket အပြင်အဆင်မရှိခြင်း
Upgrade/Connection headers မပါသော nginxproxy_http_version 1.1 မပါခြင်း၂၀% - Docker NAT က localhost ကို အပြင်အဆင့်အဖြစ် သတ်မှတ်ခြင်း
trustedProxies ထည့်ခြင်းဖြင့် ပြင်သည်၁၀% - Clawdbot/Moltbot အဟောင်းကနေ Port ပဋိပက္ခများ
၅% - Tailscale loopback အစား ချိတ်ဆက်ခြင်း
100.x.x.x တွင် ချိတ်ဆက်သည်bind: "loopback" ကို အပြင်အဆင်တွင် အတင်းပြောင်းခြင်းဖြင့် ပြင်သည်၅% - Auth token မကိုက်ညီမှု
openclaw dashboard ကို run ပြီးတော့ မှန်ကန်သော tokenized link ရရန် ပြင်သည်အများဆုံးဖြစ်သော — reverse proxy WebSocket အပြင်အဆင် — သည် HTTP ပိုင်းအလုပ်လုပ်နေသောကြောင့် လွယ်ကူစွာ မလွဲဘဲဖြစ်သည်။ HTML ကိုမြင်နိုင်သည်၊ CSS ကို load လုပ်နိုင်သော်လည်း WebSocket သည် တိတ်တဆိတ်ပျက်ကွက်သည်။
သင်သည် proxy အောက်တွင် run လျှင်၊ dashboard ကို ချိတ်ဆက်မရပါက၊ အဲဒါက သင့်ရဲ့ ပထမဆုံး စစ်ဆေးမှုဖြစ်သည်။
Macaron တွင် UI ကို သင့်အတွက် ဦးစားပေးဆောင်ရွက်ထားပါသည် — nginx ကွန်ဖဂျူရေးရှင်းများကို ပြင်ရန်မလို၊ WebSocket အချိန်ကုန်ဆုံးမှုများကို တိက်မြောက်စေရန်မလို၊ Docker NAT အံ့သြမှုများကို ရှောင်ရှားနိုင်ပါသည်။ လုပ်ငန်းစဉ်များကို စမ်းသပ်မည်မီ အခြေခံအုတ်မြစ်ပြဿနာများကို ဖြေရှင်းရတာ ပင်ပန်းနေပြီလား၊ လုပ်ငန်းစဉ်များအတွက် အိမ်ရှင် UI ကို ပိုမိုကြိုက်နှစ်သက်ပါသလား? Macaron အကောင့်တစ်ခု ဖန်တီးပါ။
မေးလေ့ရှိသော မေးခွန်းများ
မေး: ဒက်ရှ်ဘုတ် HTML ကို ဖွင့်ပါသည်၊ ဒါပေမယ့် ဘာမှ အလုပ်မလုပ်ဘူး။ ဘယ်က စတင်ရမလဲ? DevTools → Network → WS tab ကိုဖွင့်ပါ။ WebSocket handshake ပျက်ကွက်နေပါက၊ သင်၏ reverse proxy config တွင် Upgrade နှင့် Connection headers မရှိခြင်း almost certainly ဖြစ်ပါသည်။ အဲဒီအခါ 60% ဖြစ်ပါတယ်။ မကောင်းသောအင်စတောလေးရှင်းကို ပထမဦးစွာ ရှင်းလင်းချင်ပါက၊ proxy configs တွင် နက်ရှိုင်းစွာ ဝင်ရောက်မီ OpenClaw installation guide နှင့် နှိုင်းယှဉ်ကြည့်မည်ဖြစ်ပါသည်။
မေး: ငါ့ gateway သည် "pairing required" ဟု ပြသသည်၊ ဒါပေမယ့် token ကို မှန်ကန်စွာ သတ်မှတ်ခဲ့ပါပြီ။ ဘာကြောင့်လဲ? remote=172.18.0.1 အတွက် သင့်ရဲ့ log တွေကို စစ်ပါ။ သင် Docker Desktop (Windows သို့မဟုတ် Mac) တွင်ရှိပါက၊ NAT သည် gateway ကို သင့်အား ပြင်ပချိတ်ဆက်မှုဟု ထင်သွားအောင် ပြုလုပ်သည်။ gateway ကို ဒေသတွင်းတွင် လည်ပတ်ပါ၊ သို့မဟုတ် သင့် config တွင် trustedProxies ကို ထည့်ပါ — အဆိုပါ Docker setup guide သည် ဤအခြေအနေအတွက် တိကျသော network config ကို ရှိသည်။
Q: Gateway က စာမျက်နှာတိုင်းကို ပြန်တင်တိုင်း ကျွန်တော့်ရဲ့ token ကို မေးနေပါတယ်။ မင်းရဲ့ browser localStorage က ဆက်မရှိဘူး။ အများအားဖြင့် incognito mode၊ privacy extension တစ်ခုတည်းသို့မဟုတ် "clear storage on exit" ဖွင့်ထားတာကြောင့်ဖြစ်ပါတယ်။ openclaw dashboard မှ tokenized URL ကို အသုံးပြုပါ။ အကယ်၍ auth ပြဿနာများသည် ၎င်းထက် ကျော်လွန်ပါက OpenClaw security checklist သည် token စီမံခန့်ခွဲမှုကို ပိုမိုအသေးစိတ် ဖော်ပြထားသည်။
Q: Port 18789 ကို အခုတလော အသုံးပြုနေပါတယ်။ ဘာကြောင့်လဲ။ ဆယ့်ကိုးခါထဲက ဆယ့်ကိုးခါဟာ ဟောင်းနေတဲ့ Moltbot သို့မဟုတ် Clawdbot gateway ဖြစ်ပါတယ်။ lsof -i :18789 က ဘာဖြစ်တယ်ဆိုတာပြောပြပါလိမ့်မယ်။ အဲဒါကို သတ်လိုက်ပါ၊ ဒါမှမဟုတ် OpenClaw ရဲ့ port ကို config မှာ ပြောင်းလိုက်ပါ။ မင်း Moltbot မှာ မကြာသေးခင်က ကူးပြောင်းခဲ့ရင် အဲဒီနှစ်ခုကို အတူတူ လည်ပတ်နေတဲ့အကြောင်း ဖတ်သင့်တယ် — အဲဒီမှာ ဝန်ဆောင်မှု ငြိမ်းဘဲွများဟာ ရိုးရိုး Gotcha တစ်ခုဖြစ်ပါတယ်။
Q: HTTPS dashboard က WebSocket ကို ချိတ်ဆက်မရဘူး။ Mixed content — browser က ws:// ကို HTTPS စာမျက်နှာမှာ ခွင့်မပြုဘူး။ မင်းရဲ့ proxy က wss:// termination ကို ကိုင်တွယ်ဖို့ လိုအပ်ပါတယ်။ VPS ပေါ်မှာဖြစ်ပြီး ဒီပြဿနာကို ဆက်ကြုံနေရင် VPS deployment guide မှာ nginx + SSL ကိုယ်တိုင် အသုံးပြုနိုင်တဲ့ config ရှိပါတယ်။
Q: Tailscale အလုပ်နေပြီး အခု dashboard ကို တစ်ခါတစ်ရံ ဒေသတွင်းမှာ မပွင့်ပါ။ ပြဿနာတစ်ခု (#1380) — Tailscale က gateway ကို 127.0.0.1 အစား 100.x.x.x မှာ ဆွဲယူနိုင်ပါတယ်။ သင့် configuration မှာ "bind": "loopback" ကို ထည့်ပြီး ပြန်စပါ။ bind အပြုအမူက နောက်ထပ်ရှုပ်ထွေးနေပါက gateway ကိုယ်စားလှယ် က နည်းလမ်းအားလုံးကို အသေးစိတ်ဖော်ပြထားပါတယ်။