- OpenClaw runs natively on Windows 11 — Node.js 20 LTS is all you need to start
- The most common failure: npm global bin not in PATH — fix it in System Environment Variables
- No admin rights required — OpenClaw installs to user-level npm prefix by default
- Windows Defender may flag the gateway — add an exclusion to stop false positives
- Use PM2 or NSSM to run OpenClaw as a Windows service that survives reboots
Eighty percent of Windows install failures come from one cause: npm's global binary directory not being in the system PATH. This guide fixes that before it happens to you, then walks through every step from Node.js install to running OpenClaw as a persistent Windows service.
Prerequisites
Before running a single command, confirm you have these:
- Windows 11 (any edition — Home, Pro, or Enterprise)
- Internet connection for npm install
- A terminal — Windows Terminal is recommended, PowerShell works, Command Prompt works
- An LLM API key (OpenAI, Anthropic, or any supported provider)
You do not need WSL, Docker, or admin rights for a basic OpenClaw install.
Install Node.js 20 LTS
Download the Windows installer from nodejs.org — choose the LTS version (20.x as of early 2025). Run the installer with default settings. One checkbox matters: ensure "Add to PATH" is checked. It's checked by default but verify it.
After install, open a new terminal window (important — existing windows won't see the new PATH) and verify:
node --version # Should show v20.x.x
npm --version # Should show 10.x.x or higher
Install OpenClaw
With Node.js confirmed, install the OpenClaw CLI globally:
npm install -g @openclaw/cli
This downloads the package and installs the openclaw binary to your npm global prefix directory. The install takes 30–60 seconds depending on your connection. When it finishes, test it:
openclaw --version
If you get "command not found" or "not recognized as an internal or external command" — you have a PATH issue. Skip to the next section.
Fix PATH Issues (The Most Common Problem)
This is where 80% of Windows installations stumble. First, find where npm installed the binary:
npm config get prefix
This returns a path like C:\Users\YourName\AppData\Roaming\npm. That directory (not a subdirectory — the directory itself) needs to be in your PATH.
To add it permanently:
- Press Win + S, search "Environment Variables"
- Click "Edit the system environment variables"
- Click "Environment Variables" button
- Under "User variables", find PATH and click Edit
- Click New and paste the path from npm config get prefix
- Click OK on all dialogs
- Open a new terminal window and run
openclaw --version
[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";" + (npm config get prefix), "User"). Then restart your terminal.Run OpenClaw as a Windows Service
For a persistent setup that survives reboots, use PM2:
# Install PM2 globally
npm install -g pm2
# Start OpenClaw gateway
pm2 start openclaw -- serve
# Save the process list
pm2 save
# Configure PM2 to start on Windows boot
pm2 startup windows
PM2 creates a Windows startup task that launches your OpenClaw gateway automatically on login. Check status anytime with pm2 status.
Common Windows-Specific Mistakes
Three mistakes kill Windows installs repeatedly. First: running PowerShell without the right execution policy. If scripts are blocked, run Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser in PowerShell. This allows locally-created scripts to run without disabling security entirely.
Second: Windows Defender flagging the gateway. The OpenClaw gateway listens on a network port and makes outbound API calls — behavior that sometimes triggers Defender's heuristics. Add an exclusion for the OpenClaw install directory at %APPDATA%\npm\node_modules\@openclaw. This stops the false positive without disabling protection.
Third: firewall blocking the gateway port. Windows Firewall prompts when a new app tries to listen on a port. When OpenClaw first starts, allow it in the firewall dialog. If you dismissed that dialog accidentally, add a manual inbound rule for port 8080 (or your configured gateway port) in Windows Firewall.
Frequently Asked Questions
Does OpenClaw work on Windows 11?
Yes. OpenClaw runs natively on Windows 11 via Node.js. You don't need WSL for basic functionality — install Node.js 20 LTS, run npm install -g @openclaw/cli, and you're running. WSL is only required if you need Linux-specific skills or Docker-based features.
What Node.js version does OpenClaw require on Windows?
OpenClaw requires Node.js 18 or higher. Node.js 20 LTS is recommended for Windows 11. Download it from nodejs.org and use the official Windows installer — it sets PATH reliably, unlike package manager installs.
Why does "openclaw command not found" appear after npm install on Windows?
The npm global bin directory is not in PATH by default on some Windows 11 configurations. Run npm config get prefix to find the global install location, then add that directory to your user PATH via Environment Variables in System Properties. Restart your terminal after making the change.
Do I need admin rights to install OpenClaw on Windows?
No. OpenClaw installs to the user-level npm prefix by default, which requires no admin rights. If you're seeing permission errors, check that your npm prefix points to your user profile, not C:\Program Files.
Can I run OpenClaw as a Windows service?
Yes. Use PM2 to run the OpenClaw gateway as a persistent service that starts automatically on boot. Run pm2 start openclaw -- serve, then pm2 save and pm2 startup windows to persist across reboots.
Does OpenClaw support Windows Defender exclusions?
Windows Defender sometimes flags OpenClaw's gateway process due to its network activity. Add an exclusion for %APPDATA%\npm\node_modules\@openclaw in Windows Security settings. This prevents false positives without disabling Defender globally.
You now have OpenClaw running on Windows 11 — PATH fixed, Defender configured, and a persistent service that starts on boot. The setup takes under 15 minutes once you know the three Windows-specific gotchas. Your agent is ready to connect to any LLM provider and any messaging channel you choose.