Operations 3 min read

How to Install WSL2, Ubuntu, Node.js, and OpenClaw on Windows

This guide walks you through installing WSL2 on Windows, adding the Ubuntu distribution, updating packages, installing Node.js, enabling systemd, and deploying OpenClaw with its gateway configuration for LAN access, providing all necessary commands and options for a fully functional development environment.

AI Software Product Manager
AI Software Product Manager
AI Software Product Manager
How to Install WSL2, Ubuntu, Node.js, and OpenClaw on Windows

Install WSL2 and Ubuntu

Open a Command Prompt or PowerShell with administrator rights and run wsl --install. After the installation finishes, restart the machine. Then install the Ubuntu distribution with wsl --install -d Ubuntu. The Ubuntu shortcut appears in the Start menu.

Other useful commands: wsl --list --online to view available Linux distros and wsl --status to check the WSL installation state. Launch Ubuntu with wsl -d Ubuntu or via the Start menu.

WSL2 installation screenshot
WSL2 installation screenshot

Configure Ubuntu Environment

Once inside Ubuntu, update the package index and upgrade existing packages: sudo apt update && sudo apt upgrade -y Install Node.js 22:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs

Enable systemd support for WSL2 by creating /etc/wsl.conf with the following content:

sudo tee /etc/wsl.conf > /dev/null << 'EOF'
[boot]
systemd=true
EOF

Install and Configure OpenClaw

Run the OpenClaw installer script: curl -fsSL https://openclaw.ai/install.sh | bash The installer asks several yes/no questions; accept the defaults (gateway token, permission tightening, session directory, bash completion, gateway service). After installation, set the gateway to LAN mode so Windows browsers can reach the WSL2 gateway:

openclaw config set gateway.mode local
openclaw config set gateway.bind lan
openclaw gateway restart
OpenClaw configuration screenshot
OpenClaw configuration screenshot
Node.jsUbuntuSystem SetupWSL2Linux on WindowsOpenClaw
AI Software Product Manager
Written by

AI Software Product Manager

Daily updates of Xiaomi's latest AI internal materials

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.