Install OpenClaw on Windows (Step-by-Step)

Modern lobster logo

What is OpenClaw? OpenClaw is a local-first AI assistant framework that lets you automate workflows, browse the web, manage reminders, and integrate tools while keeping control on your machine. On Windows, you can install it natively or run it inside WSL for a smoother Unix-like experience.

Quick summary: If you want the fastest setup, use the Windows PowerShell installer below. If you want fewer path issues and better shell tooling, consider WSL (Windows Subsystem for Linux).

Quick install (PowerShell)

  1. Open PowerShell.
  2. Run:
iwr -useb https://openclaw.ai/install.ps1 | iex

Optional (skip onboarding):

& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard

Verify the install

openclaw --version
openclaw doctor --non-interactive

Start the Gateway service

openclaw gateway start
openclaw gateway status

Onboarding (recommended)

Onboarding walks you through initial configuration, provider auth, and basic setup.

openclaw onboard

Provider setup (OpenAI example)

Set your API key as an environment variable and run onboarding, or pass it directly during onboarding.

setx OPENAI_API_KEY "YOUR_KEY"
openclaw onboard --auth-choice openai-api-key

After setting an environment variable, restart OpenClaw so it picks up the change.

Provider alternatives

  • OpenRouter – broad model access via a single API key.
  • Anthropic – good for long context and safety-heavy tasks.
  • Google – fast and cost-effective options for certain workloads.

Browser Relay (control your real browser)

The Browser Relay extension lets OpenClaw control an existing Chrome/Edge/Brave tab via the local CDP relay.

  1. Install the OpenClaw Browser Relay extension from the Chrome Web Store (Edge supports it).
  2. Open the tab you want controlled.
  3. Click the extension so the badge turns ON.

Firewall notes (Windows)

  • When the gateway starts, Windows Firewall may prompt you to allow access. Allow it for private networks.
  • If Browser Relay cannot connect, ensure localhost traffic is not blocked by security software.
  • On locked-down machines, ask IT to allow local loopback traffic for the relay.

Advanced firewall rules (optional)

If you need explicit Windows Defender Firewall rules, allow inbound/outbound for the OpenClaw gateway executable and Node runtime, or allow localhost traffic. This varies by environment, so use the defaults unless you are blocked.

Why WSL can be better (optional)

  • Cleaner dev tooling – Linux package managers, predictable paths, and fewer Node/npm edge cases.
  • Better shell scripting – Bash/Zsh workflows are often smoother for automation.
  • Fewer PATH quirks – Windows PATH issues are a common pain point for CLI tools.

If you are already comfortable with WSL, you can install OpenClaw inside it using the Linux installer:

curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash

WSL pitfalls to avoid

  • Make sure WSL 2 is enabled and your distro is updated.
  • Do not mix Windows and WSL Node installations in the same PATH.
  • Use Linux paths inside WSL (e.g., ~/), not C:\.

Common errors and fixes

  • “openclaw is not recognized” -> Run npm config get prefix, add \\bin to your PATH, then reopen PowerShell.
  • “npm error spawn git / ENOENT” -> Install Git for Windows, reopen PowerShell, and rerun the installer.
  • Node version too old -> Install Node 22+ (the installer will try to fix this, but corporate machines sometimes block it).
  • Permission errors -> Run PowerShell as Administrator or switch npm global prefix to a user-writable path.
  • Gateway will not start -> Restart with openclaw gateway restart and check openclaw status.

Config locations (quick reference)

  • Workspace: %USERPROFILE%\\.openclaw\\workspace
  • Logs: %USERPROFILE%\\.openclaw\\logs

Example config snippets

Set OpenAI API key (PowerShell):

setx OPENAI_API_KEY "YOUR_KEY"

Check gateway status:

openclaw gateway status

Basic reminder (cron-style in OpenClaw UI): “Remind me every day at 5:30am”

Next steps

  • Connect providers (OpenAI, etc.).
  • Install the Browser Relay extension if you want full browser control.
  • Create your first automation and reminders.

Leave a Reply

Your email address will not be published.