How to Deploy Openclaw on Windows: WSL2 Setup Guide
Running Openclaw on Windows is straightforward with WSL2. This guide walks you through installing Openclaw on Windows using the Windows Subsystem for Linux, enabling you to run a full Linux environment without leaving Windows.
Prerequisites
- Windows 10 version 2004+ or Windows 11
- Administrator access to PowerShell
- Internet connection
Step 1: Install WSL2 and Ubuntu
Open PowerShell as Administrator and run:
wsl --install -d Ubuntu-24.04
Reboot your computer if Windows prompts you to do so. After reboot, the Ubuntu terminal will automatically open to complete setup.
Step 2: Enable Systemd
Openclaw's background service requires systemd. Open your new Ubuntu/WSL terminal and run:
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOF
Then shut down WSL to apply changes:
wsl --shutdown
Re-open Ubuntu and verify systemd is running:
systemctl --user status
Step 3: Install Openclaw
Inside WSL, run the standard Linux installer:
curl -fsSL https://openclaw.ai/install.sh | bash
This automatically detects your environment, installs Node.js 22 if needed, and installs the Openclaw CLI.
Step 4: Configure and Start
Run the onboarding wizard to configure your gateway and install the background daemon:
openclaw onboard --install-daemon
The wizard guides you through connecting model providers (like Anthropic or OpenAI), configuring your workspace, and setting up chat channels. The --install-daemon flag configures Openclaw to run as a background service.
Auto-Starting on Windows Boot
To start Openclaw automatically when Windows boots (even before login):
Enable Lingering in WSL
sudo loginctl enable-linger $USER
Create Windows Scheduled Task
In PowerShell (Administrator), create a task to start WSL on boot:
schtasks /create /tn "Start WSL" /tr "wsl.exe" /sc onstart /ru SYSTEM
Replace Ubuntu with your distribution name if different (check with wsl --list --verbose).
Quick Example
After setup, verify your installation:
User: openclaw status Agent: Openclaw Gateway v2.5.1 running on localhost:18789
Best Practices & Troubleshooting
- WSL Updates: Keep WSL updated with
wsl --update - Firewall: Allow WSL through Windows Defender Firewall if accessing from other devices
- Port Binding: Use --bind lan to access from other devices on your network
- File Access: Access WSL files via \\wsl$\Ubuntu\home\<user> in Windows Explorer
For more deployment options, check out our guide on Deploy Flyio Openclaw for cloud hosting. If you're new to Openclaw, you might also want to read about Elevated Mode Openclaw for advanced permissions.

Your Openclaw instance is now running on Windows via WSL2. Start chatting through your configured channels or access the dashboard at openclaw dashboard.