OpenClaw Gateway Fault Diagnosis and Repair
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @user_711d6c08/openclaw-gateway-fixer.
About this skill
Problem
OpenClaw gateway can fail to start on Windows: http://127.0.0.1:18789 may be refused or time out, or the web UI may report gateway token issues. gateway.cmd may exist but double-clicking does nothing. A common root cause is Chinese username corruption during UTF-8/GBK conversion, such as 吴清能 becoming 鍚存竻鑳絓, which can break TMPDIR, node.exe, or workspace paths.
How It Works
The skill follows a diagnostic sequence:
- Check process and port: confirm whether 18789 is LISTENING and remove port conflicts.
- Inspect gateway.cmd: read C:\Users\...\.openclaw\gateway.cmd for garbled Chinese paths, missing backslashes, and wrong Node.js paths.
- Inspect openclaw.json: check agents.defaults.workspace and gateway.auth.token for usable values.
- Apply fixes: back up files, then rewrite gateway.cmd with scripts/fix-gateway-cmd.ps1; optionally start the gateway directly, generate a silent launcher, or create a Windows scheduled task for delayed logon startup and failure retries.
Limits
It targets Windows startup failures, Chinese username encoding, port conflicts, and gateway.cmd breakage. It does not diagnose OpenClaw gateway logic bugs. Upgrades that regenerate gateway.cmd may require the fix to be applied again.
Use Cases
- Troubleshoot OpenClaw web UI connection refused or timeout by checking port 18789.
- Repair garbled Chinese username paths in gateway.cmd that cause silent failures.
- Free or reconfigure port 18789 when another process blocks gateway access.
- Reapply the encoding fix after OpenClaw updates regenerate gateway.cmd.
Best For
- IT operations engineers maintaining Windows workstations: restore OpenClaw gateway.
- Local operators using Chinese OpenClaw UI: fix inaccessible gateway token page.
- Engineers deploying agent tools: troubleshoot port conflicts and startup scripts.
- Windows users after upgrades: reconfigure automatic gateway startup.
Related Skills
Detects child climbing, leaning out, or gripping window/balcony edges from surveillance video and outputs tiered alerts with historical reports.
A pre-release security auditor for Skills that statically checks injection, credentials, SSRF, CVEs, and permissions, with scored reports.
For independent developers, automates Git weekly reports, prioritized bug tickets, and project health checks into shareable Markdown.
Scan Windows caches, temporary files, and junk files, show space usage and risk levels, and clean selected items to free disk space.