Install OpenClaw on WSL
This guide walks you through installing Ubuntu 24.04 via WSL2 on Windows and deploying OpenClaw inside it. Perfect if you want to run OpenClaw on your Windows machine with a full Linux environment.
Prerequisites
Section titled “Prerequisites”- OS: Windows 10 2004+ or Windows 11
- Memory: 8 GB or more recommended (WSL2 consumes a share of it)
- CPU: Virtualization enabled (VT-x / SVM in BIOS)
Step 1: Enable WSL2 and install Ubuntu 24.04
Section titled “Step 1: Enable WSL2 and install Ubuntu 24.04”Open PowerShell or Windows Terminal as Administrator and run:
wsl --install -d Ubuntu-24.04The first run enables WSL2 and downloads Ubuntu 24.04. Reboot when it finishes.
After reboot, Ubuntu starts automatically — set up your username and password.
To verify the WSL version, run in PowerShell:
wsl --statusDefault Version: 2 means WSL2 is ready.
Step 2: Update the system
Section titled “Step 2: Update the system”Inside the Ubuntu terminal:
sudo apt update && sudo apt upgrade -yStep 3: Install OpenClaw
Section titled “Step 3: Install OpenClaw”The official installer detects your OS, provisions the required Node runtime, and installs OpenClaw:
curl -fsSL https://openclaw.ai/install.sh | bashRe-login (or run source ~/.bashrc) and verify:
openclaw --versionSkip the onboarding wizard with:
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
Step 4: Initialize and start
Section titled “Step 4: Initialize and start”Run the setup wizard — pick your model provider and paste your API key:
openclaw onboard --install-daemon--install-daemon registers the Gateway as a systemd service with auto-start on boot. Modern WSL2 enables systemd by default.
Check the status:
openclaw statusStep 5: Access from Windows (optional)
Section titled “Step 5: Access from Windows (optional)”WSL2 forwards localhost ports to Windows automatically, so open in your browser:
http://localhost:18789Troubleshooting
Section titled “Troubleshooting”WSL default version is not 2?
Section titled “WSL default version is not 2?”Force it in PowerShell:
wsl --set-default-version 2openclaw: command not found?
Section titled “openclaw: command not found?”Run source ~/.bashrc or re-login. Still missing? Check Node:
node -vUninstall?
Section titled “Uninstall?”Run openclaw uninstall inside WSL, or remove the whole distro from PowerShell:
wsl --unregister Ubuntu-24.04Next steps
Section titled “Next steps”- Configure your model: OpenClaw Installation & Model Configuration
- Connect DLinkClaw: DLinkClaw Channel Plugin
