Most “install” problems are not one problem — they are one of these:
- The CLI is not installed (or not on PATH).
- The CLI is installed, but the gateway service did not install / start.
- The gateway is running, but the Control UI / dashboard cannot connect (auth/bind/port/tunnel).
This guide helps you classify the failure quickly, then links you to the precise fix pages.
If you are brand new and want the happy path first, start with:
0) Quick triage (2 minutes)
Run these commands in the same environment where you expect OpenClaw to work:
command -v openclaw || which openclaw || true
openclaw --version
node -v
npm -v
Now classify what you see:
- No
openclawfound → go to 1) CLI not on PATH. openclawruns, butopenclaw onboard --install-daemonfails → go to 2) Gateway service install fails.- Gateway “seems running”, but UI says unauthorized / pairing required / connection refused → go to 4) Control UI can’t connect.
1) CLI not on PATH (or installed but not discoverable)
1.1 Confirm you actually installed it globally
Recommended global install:
npm install -g openclaw@latest
If npm says it installed but openclaw is still missing, the global bin directory is not on PATH.
Useful diagnostics:
npm prefix -g
npm bin -g
echo "$PATH"
If npm bin -g is not present in PATH, add it (shell profile) and restart your terminal.
Dedicated fix page:
Windows native installs can also fail to refresh PATH reliably:
If you are deciding between native Windows and WSL2 first:
If you want the deeper operator guide for native Windows service / PATH / node-host behavior:
- /guides/openclaw-native-windows-field-guide
- /troubleshooting/solutions/windows-scheduled-task-path-tools-exec-cli-not-found
- /troubleshooting/solutions/windows-native-node-run-hangs-or-runtime-unstable
1.1.1 Windows installer closes before you can read the error
If the Windows installer/bootstrapper closes PowerShell immediately, stop using the one-liner for now and switch to a manual install path so the error stays visible:
npm install -g openclaw@latest
openclaw --version
openclaw doctor
For choosing between native Windows and WSL2 before you go further:
- /guides/openclaw-windows-native-vs-wsl2
- /troubleshooting/solutions/windows-installer-powershell-closes-before-error
1.2 Node version mismatch (classic)
If openclaw starts but prints Node runtime errors, or installs a package but fails at runtime, confirm your Node is supported:
2) Gateway service install fails
The onboarding flow typically installs a per-user supervised gateway service:
openclaw onboard --install-daemon
If the service install fails, do not delete your state directory first — fix the daemon install.
2.1 Windows (WSL2): systemd is not enabled
On WSL2, the daemon relies on systemd. If systemd is off, installs fail or the gateway never stays running.
Fix page (step-by-step):
2.2 Onboarding “skips model/auth setup” (installed but unresponsive)
If onboarding completes but the agent is unresponsive (and it looks like you never got to the model/auth part), use:
3) npm install errors: permissions, git, and “ioctl”
3.1 EACCES / permission denied on global installs
If you see EACCES when running npm install -g ..., do not “just sudo it” as a first reflex.
Fix your global npm prefix so installs are user-owned:
3.2 spawn git ENOENT during install
Some dependencies require git. If your environment lacks it:
3.3 inappropriate ioctl for device running install.sh
If you install via the one-liner (curl ... | bash) in a non-interactive environment, the installer can emit repeated ioctl warnings.
Use a real TTY or disable the interactive UI:
4) Control UI / dashboard can’t connect
If openclaw is installed and the gateway is running, but the UI can’t connect, this is usually not an install problem.
4.1 “unauthorized” reconnect loop
4.2 “disconnected (1008): pairing required”
4.3 Docker: build/setup fails, or state dir is not writable
If your Docker build fails:
If the container cannot write to ~/.openclaw/ (or the mounted state directory):
For the full Docker walk-through:
5) If you’re “installed” but nothing works: reset the runtime, not the state
Most “nuke and reinstall” attempts fail because they delete the state directory (tokens, device approvals, channel creds), but keep the broken runtime/service.
A better recovery pattern:
- Leave
~/.openclaw/intact (or back it up). - Force reinstall the gateway service:
openclaw gateway install --force
openclaw gateway restart
- Re-open the dashboard from a fresh tokenized link:
openclaw dashboard
If you’re deploying on a platform that resets containers/VM images, also read: