Clawdbot LogoClawdbot

Installing Clawdbot on Windows via WSL2

Complete guide to running Clawdbot on Windows using Windows Subsystem for Linux (WSL2). Includes Ubuntu setup, Node.js installation, and solutions for USB/Serial hardware passthrough.

Requirements

  • • Windows 10 version 2004+ or Windows 11
  • • Administrator access
  • • Stable internet connection
  • • At least 10GB free disk space
1

Enable WSL2 and Install Ubuntu

First, enable WSL2 on your Windows machine and install Ubuntu as your Linux distribution.

Open PowerShell as Administrator

Right-click the Start button and select "PowerShell (Admin)" or "Windows Terminal (Admin)".

# Enable WSL2

wsl --install

This command enables WSL2, installs Ubuntu, and updates your kernel automatically.

Restart Your Computer

After the installation completes, restart your computer to finalize the WSL2 setup.

Restart-Computer

Complete Ubuntu Setup

After restarting, Ubuntu will open automatically. Create a username and password when prompted.

Important: Remember your username and password! You'll need them for sudo commands.

2

Update Ubuntu and Install Dependencies

Update your Ubuntu package manager and install essential build tools.

Update Package Lists

sudo apt updatesudo apt upgrade -y

Install Build Tools

sudo apt install -y build-essential curl git

This installs compilers, curl, and git needed for Node.js and Clawdbot.

3

Install Node.js Using NVM

We recommend using Node Version Manager (NVM) for easy Node.js installation and version management.

Install NVM

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

Load NVM and Install Node.js

export NVM_DIR="$HOME/.nvm"[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"nvm install 20nvm use 20

✓ Verifies installation: node --version should show v20.x.x

4

Install Clawdbot

With Node.js installed, you can now install Clawdbot globally on your WSL2 Ubuntu instance.

Install Clawdbot CLI

npm install -g @clawdbot/cliclawdbot --version

Initialize Clawdbot

clawdbot init

Follow the prompts to configure your Clawdbot instance.

Start the Clawdbot Service

clawdbot start
Clawdbot is now running on Windows!

USB/Serial Hardware Passthrough

If you're connecting hardware devices (like Gateways, sensors, or Arduino) to Clawdbot, you need to configure USB passthrough from Windows to WSL2.

Why This is Necessary

WSL2 runs in a virtual machine. Windows doesn't automatically forward USB devices to Linux. You need a bridge tool to access hardware from Ubuntu.

Option 1: USBIPD-Win (Recommended)

Microsoft's official USB over IP tool for WSL2. Best for most users.

Step A: Install usbipd-win (Windows PowerShell - Admin)

winget install usbipd

Step B: List attached USB devices (Windows PowerShell - Admin)

usbipd list

Step C: Attach device to WSL2 (Windows PowerShell - Admin)

usbipd bind --busid 1-1usbipd attach --wsl --busid 1-1

Step D: Verify in WSL2 (Ubuntu)

lsusb

Your device should now appear in the list!

Option 2: Serial Port Forwarding

For simple serial devices, you can use TCP forwarding.

# In WSL2, access Windows serial ports via /dev/ttyS*ls /dev/ttyS*

COM1 on Windows = /dev/ttyS0 in WSL2

Make USB Attachment Persistent

To automatically attach USB devices on WSL2 startup, create a startup script.

# Create PowerShell script: attach-usb.ps1usbipd attach --wsl --busid 1-1

Add to Windows Task Scheduler to run at login.

Verify Your Installation

Run these commands to ensure everything is working correctly.

clawdbot status

Should show: "Clawdbot is running"

node --version

Should show: v20.x.x or higher

clawdbot --help

Should display all available commands

clawdbot config list

Should show your configuration

Windows-Specific Troubleshooting

Issue: WSL2 Can't Access Internet

Windows Firewall or VPN software may block WSL2 network access.

# In PowerShell (Admin), restart WSL networkwsl --shutdownwsl

Issue: Node.js Commands Not Found

NVM may not be loaded in new terminal sessions.

# Add to ~/.bashrcecho 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrcecho '[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"' >> ~/.bashrcsource ~/.bashrc

Issue: Slow File I/O Performance

Cross-platform file access (Windows/Linux) is slower in WSL2.

Solution: Keep project files inside WSL2 (~/) rather than /mnt/c/ for better performance.

Installation Complete!

Clawdbot is now running on your Windows machine via WSL2. Here's what to do next:

Need More Help?

If you encounter issues during installation, our community is here to help.

Join our Discord Server