How to Set Up OpenClaw on Windows with WSL2
Windows is the most popular desktop operating system, and plenty of entrepreneurs and business owners want to test OpenClaw on their Windows PC before committing to a VPS. The good news: it works well through WSL2 (Windows Subsystem for Linux), which gives you a full Linux environment inside Windows. This guide walks you through every step — from enabling WSL2 to running your first OpenClaw agent — with no prior Linux experience required. Plan for about 45 minutes from start to finish.
What You Need
- ✓Windows 10 version 2004 or later, or Windows 11
- ✓At least 8GB RAM (16GB recommended)
- ✓Administrator access to your Windows PC
- ✓An AI provider API key (Claude, OpenAI, or Gemini)
- ✓About 45-60 minutes of uninterrupted time
Step-by-Step Guide
Enable and install WSL2
Open PowerShell as Administrator and run: wsl --install. This command enables the required Windows features and installs Ubuntu as the default Linux distribution. Your computer will need to restart. After reboot, the Ubuntu setup will launch automatically — create a username and password when prompted. These are your Linux credentials, separate from your Windows login. If WSL2 is already installed, run wsl --update to make sure you have the latest version.
Update Ubuntu and install Node.js
Open the Ubuntu terminal from your Start menu. First, update the system packages: sudo apt update && sudo apt upgrade -y. Then install Node.js. The recommended approach is using nvm (Node Version Manager) for easy version management. Run the nvm installer script from the official repository, restart your terminal, then install Node.js 22: nvm install 22. Verify with: node --version. You should see v22.x.x or later.
Install Git and additional dependencies
Git comes pre-installed on most WSL2 Ubuntu distributions, but verify with: git --version. If missing, install it: sudo apt install git -y. Also install build tools that some Node.js packages need: sudo apt install build-essential -y. These tools compile native modules during the OpenClaw installation process.
Clone and install OpenClaw
Navigate to your home directory and clone the OpenClaw repository: git clone the official OpenClaw repo. Enter the directory and follow the standard installation steps — run the setup script or npm install as documented. During setup, enter your AI provider API keys when prompted. The installation process is identical to a Linux server since WSL2 runs genuine Ubuntu.
Start OpenClaw and access the dashboard
Launch OpenClaw using the start command. The dashboard will be accessible at http://localhost:3000 from your regular Windows browser — Chrome, Edge, or Firefox all work. WSL2 automatically bridges network connections, so you do not need any special configuration to access Linux services from Windows.
Configure your first agent and test
Create your first agent through the web dashboard. Write a basic Soul.md, select an AI model, and send a test message. For messaging integrations (WhatsApp, Telegram), you will need a tunneling service like ngrok since your Windows PC does not have a public IP address. For email integration, no tunnel is needed. Once everything works locally, you have validated your configuration and are ready to deploy to a VPS for 24/7 operation.
Common Mistakes to Avoid
- !Using WSL1 instead of WSL2 — always use WSL2 for full Linux kernel compatibility and better performance
- !Installing Node.js through Windows instead of inside WSL2 — all OpenClaw dependencies must be installed within the Linux environment
- !Trying to run OpenClaw from a Windows file path (like /mnt/c/) — always work from your WSL2 home directory (~/) for proper file permissions and performance
- !Expecting 24/7 operation on a Windows PC — local installations are for testing and development, not production. Your PC sleeping, restarting for Windows Update, or losing power stops the agent
- !Forgetting that WSL2 loses its IP on restart — reconfigure tunneling services after each reboot if testing webhooks
Want the full walkthrough? This guide covers the essentials, but the CampeloClaw course provides detailed video instruction for every step, troubleshooting guides, and hands-on practice exercises.
Frequently Asked Questions
Should I use my Windows PC or a VPS for production?
Always use a VPS for production. Your Windows PC is perfect for testing, learning, and configuring your agent. But for 24/7 autonomous operation, a VPS ($5-10/month) provides the reliability your agent needs. Deploy locally first, then move to a VPS once your configuration is solid.
Does OpenClaw run natively on Windows without WSL2?
OpenClaw is designed for Linux environments. WSL2 provides a full Linux kernel on Windows, which is the supported path. Running directly on Windows without WSL2 is not recommended and may cause compatibility issues with certain dependencies.
How much RAM does WSL2 use alongside OpenClaw?
WSL2 typically uses 1-2GB of RAM by default, and OpenClaw adds another 500MB-1GB. On a 16GB Windows machine, this leaves plenty of room. On 8GB machines, close unnecessary Windows applications while running OpenClaw to ensure smooth performance.
Can I access OpenClaw from other devices on my network?
Yes, but it requires configuring port forwarding from Windows to WSL2. By default, only your Windows PC can access the WSL2 services. For testing from a phone or another computer, use a tunneling service like ngrok, which also provides a public URL for webhook integrations.
Related Pages
Master OpenClaw — From Zero to 24/7 AI Assistant
Learn everything in this guide and more with step-by-step video lessons, hands-on projects, and lifetime updates. Join hundreds of students already building their AI workforce.
Get Full Course Access →