OpenClaw runs well on Windows with the right setup approach. WSL2 is the cleanest path — it gives you a full Linux environment without the friction of dealing with Windows-specific path and shell quirks.
Choose Your Approach
| Approach | Setup Time | Stability | Recommended For |
|---|---|---|---|
| WSL2 (Ubuntu) | ~30 min | ★★★★★ | Most users |
| Docker Desktop | ~20 min | ★★★★☆ | Docker-familiar users |
| Native Node.js | ~15 min | ★★★☆☆ | Quick testing only |
Option 1: WSL2 (Recommended)
Install WSL2
Open PowerShell as Administrator and run:
wsl --install
This installs WSL2 with Ubuntu by default. Restart when prompted.
After restart, Ubuntu launches and asks you to create a username and password. This is your Linux user inside WSL2.
Verify the installation:
wsl --list --verbose
You should see Ubuntu listed with VERSION 2.
Install Node.js in WSL2
Inside your WSL2 Ubuntu terminal:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version # Should print v20.x.x
Install and Configure OpenClaw
npm install -g openclaw
openclaw init
Follow the setup wizard. Configure your LLM provider in ~/.openclaw/config/providers.yml as you would on any Linux system.
Run OpenClaw as a Background Service
Using systemd in WSL2:
sudo nano /etc/systemd/system/openclaw.service
Paste:
[Unit]
Description=OpenClaw Personal AI Agent
After=network.target
[Service]
Type=simple
User=YOUR_WSL_USERNAME
ExecStart=/usr/bin/openclaw start
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl enable openclaw
sudo systemctl start openclaw
sudo systemctl status openclaw
Keep WSL2 Running When Windows Starts
By default, WSL2 shuts down when you close the terminal. To keep it running:
# In PowerShell — prevent WSL2 from terminating when idle
wsl --exec sudo service openclaw start
Or create a Windows Task Scheduler task that runs wsl.exe openclaw start at login.
Option 2: Docker Desktop
Install Docker Desktop
Download from docker.com. Enable WSL2 backend during setup (recommended).
Run OpenClaw in Docker
docker pull openclaw/openclaw:latest
docker run -d \
--name openclaw \
--restart unless-stopped \
-v "$env:USERPROFILE\.openclaw:/root/.openclaw" \
openclaw/openclaw:latest
The -v flag mounts your config directory into the container so your SOUL.md and provider config persist across container restarts.
Check it's running:
docker ps
docker logs openclaw
Edit your config:
notepad "$env:USERPROFILE\.openclaw\config\config.yml"
Option 3: Native Node.js
Install Node.js 20+ from nodejs.org. Then:
npm install -g openclaw
openclaw init
openclaw start
Known Windows Issues with Native Setup
Path separators: Some OpenClaw integrations use Unix-style paths. You may need to use forward slashes or escape backslashes in config files.
Shell commands: If you've configured shell access integrations, Windows uses cmd.exe by default. Set the shell in config:
system:
shell: "powershell.exe" # or "cmd.exe"
Line endings: Config files should use LF, not CRLF. Open YAML files in VS Code and set line endings to LF.
Running in Background with PM2
npm install -g pm2
pm2 start openclaw -- start
pm2 startup
pm2 save
PM2 will restart OpenClaw automatically if it crashes and survive reboots.
Windows Firewall Considerations
If you're connecting external platforms (WhatsApp bridge, Telegram webhook) to an OpenClaw running on your Windows machine, Windows Firewall may block inbound connections.
Allow the OpenClaw port (default 3000):
New-NetFirewallRule -DisplayName "OpenClaw" -Direction Inbound -Protocol TCP -LocalPort 3000 -Action Allow
For WhatsApp specifically — the bridge typically uses an outbound connection only, so no firewall changes are needed unless you're using an inbound webhook setup.
Troubleshooting Common Windows Issues
"node is not recognised" in PowerShell: Restart PowerShell after installing Node.js — the PATH update requires a new session.
OpenClaw crashes immediately:
Check the log: openclaw logs --tail 50. On Windows native, shell integration errors are the most common cause. Disable shell integration in config to isolate:
integrations:
shell:
enabled: false
WhatsApp bridge fails to connect: The WhatsApp bridge requires a stable QR scan. On Windows, ensure the terminal has proper Unicode support — use Windows Terminal (not cmd.exe) for the initial setup.
WSL2 can't reach the internet: Check your DNS config inside WSL2:
cat /etc/resolv.conf
# Should show a valid nameserver
ping 8.8.8.8 # Test connectivity
If DNS is broken, add to /etc/wsl.conf:
[network]
generateResolvConf = false
Then manually set /etc/resolv.conf to nameserver 8.8.8.8.
Related reading: