Complete Guide to Installing OpenClaw on Windows: From Zero to Your AI Assistant
What is OpenClaw?
OpenClaw is a self-hosted AI assistant gateway that connects your favorite chat apps (WhatsApp, Telegram, Discord, iMessage, etc.) with AI coding agents. You run it on your own machine, maintain complete control over your data, and don’t rely on any hosted services.
Core Features:
- Self-hosted: Runs on your hardware, your rules
- Multi-channel: One gateway serves multiple chat platforms simultaneously
- Agent-native: Built for AI agents with tool use, session management, memory, and multi-agent routing
- Open source: MIT licensed, community-driven
Simply put, all you need is Node.js 22+, an API key, and 5 minutes to have an always-available AI assistant.
Recommended Approach for Windows: WSL2
OpenClaw on Windows is recommended via WSL2 (Windows Subsystem for Linux), particularly with the Ubuntu distribution.
Why WSL2?
- Runtime consistency: WSL2 provides a complete Linux environment, ensuring OpenClaw’s runtime is identical to macOS/Linux versions
- Better tool compatibility: Node.js, pnpm, skill scripts, and other tools work better in Linux
- Simple installation: Just one command
wsl --installto set up WSL2
Note: Native Windows companion apps are planned but currently WSL2 is the recommended approach.
Complete Installation Process
Step 1: Install WSL2 and Ubuntu
Open PowerShell (Administrator mode)
- Press
Win + X, select “Windows PowerShell (Admin)” or “Windows Terminal (Admin)”
- Press
Install WSL2
1
wsl --install
To explicitly specify Ubuntu 24.04:
1
2
3
4
5# First, check available distributions
wsl --list --online
# Install Ubuntu 24.04
wsl --install -d Ubuntu-24.04Restart your computer
If Windows prompts for a restart, please restart your computer.
First Ubuntu launch
After restart, open the Start menu, search for “Ubuntu” and launch it. The first launch will ask you to:
- Set a Linux username (lowercase letters recommended)
- Set a password (input is hidden, this is normal)
Step 2: Enable systemd (Required)
OpenClaw’s Gateway service requires systemd support.
Run the following command in the Ubuntu terminal:
1
2
3
4sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOFShutdown WSL2
Back in PowerShell (Admin), execute:
1
wsl --shutdown
Reopen Ubuntu
Launch Ubuntu again from the Start menu.
Verify systemd is enabled
1
systemctl --user status
If you see systemd status output (even errors are okay, just not “command not found”), systemd is enabled.
Step 3: Install OpenClaw
Now we install OpenClaw in the WSL2 Ubuntu environment.
Run the installation script
1
curl -fsSL https://openclaw.ai/install.sh | bash
This script will automatically:
- Detect and install Node.js 22+ (if missing)
- Install Git (if missing)
- Install OpenClaw globally via npm
- Run the onboarding wizard (for interactive terminals)
Wait for installation to complete
The installation may take a few minutes depending on network speed.
Verify installation
1
openclaw --version
If it shows a version number (e.g.,
0.x.x), installation succeeded.
Step 4: Run the Onboarding Wizard
OpenClaw provides a friendly onboarding wizard to help with initial configuration.
1 | openclaw onboard --install-daemon |
The wizard will guide you through:
- Authentication setup: Configure API keys (OpenAI, Anthropic, etc.)
- Gateway settings: Configure basic gateway parameters
- Optional channels: Set up WhatsApp, Telegram, Discord, etc. (can skip for now)
- Install system service: Install Gateway as a background service
Tip: If you just want to try it quickly, you can skip chat channel configuration and use the browser Control UI directly.
Step 5: Check Gateway Status
If you installed the Gateway service, it should already be running:
1 | openclaw gateway status |
You should see output like:
1 | ✔ Gateway is running (PID: xxxxx) |
If not running, manually start it:
1 | openclaw gateway start |
Step 6: Open the Control UI
OpenClaw provides a browser-based Control UI where you can chat directly with your AI assistant.
1 | openclaw dashboard |
This will automatically open http://127.0.0.1:18789/ in your default browser.
If the browser doesn’t auto-open, you can manually visit:
- Local access:
http://127.0.0.1:18789/ - Or use WSL2’s IP address (see Advanced Tips)
Getting Started
Method 1: Chat in Control UI
In the browser Control UI, you can directly message your AI assistant. Try asking:
- “Hello, please introduce yourself”
- “Help me summarize today’s todos”
- “Search for the latest AI news”
Method 2: Configure Chat Channels
If you want to use OpenClaw in WhatsApp, Telegram, etc., you need to configure the respective channels.
View channel configuration docs:
1 | openclaw help channels |
Or visit the official docs: https://docs.openclaw.ai/channels
Common Issues & Solutions
Q1: Can’t find openclaw command after installation?
Cause: Usually a PATH environment variable issue.
Solution:
- Close the current Ubuntu terminal and open a new one
- If still not found, check Node.js global install path:
1
npm config get prefix
- Ensure this path is added to
~/.bashrcor~/.zshrc:1
2echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Q2: How to access WSL2’s Gateway from Windows host?
Problem: WSL2 has its own virtual network, Windows host browser can’t access 127.0.0.1:18789 by default.
Solution: Use port forwarding (requires administrator privileges).
In PowerShell (Admin), run:
1 | # Get WSL2's IP address |
Then access http://localhost:18789/ from Windows host.
Note: WSL2’s IP address changes after restart, you’ll need to re-run the port forwarding rule.
Q3: Gateway won’t start, port already in use?
Solution: Change Gateway port.
Edit config file:
1 | nano ~/.openclaw/openclaw.json |
Add or modify:
1 | { |
Save and restart Gateway:
1 | openclaw gateway restart |
Q4: How to update OpenClaw?
1 | # npm installation method |
Q5: How to uninstall OpenClaw?
1 | # Stop and remove service |
Advanced Tips
1. Run Gateway in foreground (for debugging)
1 | openclaw gateway --port 18789 |
Press Ctrl+C to stop.
2. Send test message (requires configured channel)
1 | openclaw message send --target +15555550123 --message "Hello from OpenClaw" |
3. Customize config and data directories
Specify via environment variables:
1 | export OPENCLAW_HOME=~/my-openclaw |
Full environment variable reference: https://docs.openclaw.ai/help/environment
4. View Gateway logs
1 | openclaw gateway logs |
Or use systemd (if service is installed):
1 | journalctl --user -u openclaw-gateway -f |
Next Steps
Congratulations! You’ve successfully installed and run OpenClaw on Windows.
Recommended next steps:
- Explore Control UI: Familiarize yourself with basic AI assistant features
- Connect chat channels: Configure Telegram, Discord, etc. for always-on assistance
- Customize configuration: Adjust OpenClaw’s behavior, add workspace files (
SOUL.md,AGENTS.md, etc.) - Explore skill system: Add new skills to your AI assistant
Useful resources:
- Official docs: https://docs.openclaw.ai/
- GitHub repo: https://github.com/openclaw/openclaw
- Community: https://discord.com/invite/clawd
- Skill marketplace: https://clawhub.com
Summary
With WSL2, Windows users can easily run OpenClaw and enjoy the same experience as Linux/macOS users. The entire installation requires only:
- ✅ Install WSL2 and Ubuntu
- ✅ Enable systemd
- ✅ Run installation script
- ✅ Complete onboarding wizard
- ✅ Open Control UI and start chatting
The whole process takes less than 15 minutes, and even users with no Linux experience can complete it easily.
Now your personal AI assistant is ready! 🎉
Related Reading:

