How to Install OpenClaw on Windows

$9.99

Complete step-by-step setup guide from download to your first AI agent conversation

👁️ Preview Guide
Category:

Run Your Own AI Agent Framework — Starting From Zero

OpenClaw is an open-source AI agent framework that turns your computer into a command center for autonomous AI assistants. Unlike ChatGPT where you chat back and forth, OpenClaw agents can take actions on your behalf — browse the web, write files, run code, manage projects, and work across multiple tools simultaneously.

This guide walks you through every step of installation on Windows. No assumptions about your technical skill. If you can download a file and type a command, you can run OpenClaw.

What You Need Before We Start

  • Windows 10 or 11 (Home or Pro — both work)
  • 8GB RAM minimum (16GB recommended)
  • Node.js — we’ll install this together
  • An AI API key — from OpenRouter (free models available), OpenAI, or Anthropic
  • 30-45 minutes for first-time setup

Step 1: Install Node.js

Node.js is the engine that runs OpenClaw. Think of it like how you need a media player to watch videos — Node.js “plays” OpenClaw.

  1. Go to nodejs.org
  2. Click the green “LTS” button (Long Term Support = stable version)
  3. Run the downloaded installer, click Next through everything
  4. Important: Make sure “Add to PATH” is checked
  5. Click Install, then Finish

Verify it worked:

node --version
npm --version

You should see version numbers. If you see “not recognized,” restart your computer and try again.

Step 2: Install OpenClaw

# Install OpenClaw globally
npm install -g openclaw

# Verify installation
openclaw --version

You should see something like OpenClaw 2026.x.x.

Step 3: Run Initial Configuration

# Start the interactive setup wizard
openclaw configure

The wizard walks you through:

  • Gateway setup: Choose local (runs on your machine) or cloud
  • API key: Enter your OpenRouter, OpenAI, or Anthropic key
  • Default model: Pick which AI model your agents use
  • Workspace: Where agent files and data are stored

Recommended First-Time Settings

# For free/low-cost setup with OpenRouter:
openclaw config set gateway.provider openrouter
openclaw config set gateway.apiKey sk-or-YOUR-KEY-HERE
openclaw config set agents.defaults.model openrouter/auto

Step 4: Start the Gateway

# Start the OpenClaw gateway server
openclaw daemon start

The gateway is the “brain” that coordinates your agents. It runs in the background and handles all AI requests.

Step 5: Launch Your First Agent

# Start an interactive agent session
openclaw agent

You’ll see a prompt where you can type instructions. Try:

You: Create a file called hello.txt on my Desktop that says "My AI agent made this!"
You: What files are on my Desktop?
You: Search the web for the latest AI news and summarize the top 3 stories

Understanding the Architecture

Component What It Does Command
Gateway Routes AI requests, manages agents openclaw daemon start/stop/status
Agent Individual AI assistant that takes actions openclaw agent
Config Settings for models, keys, preferences openclaw config get/set
Workspace Files, memory, and agent data ~/.openclaw/workspace/

Changing Your AI Model

Different models have different strengths. Here’s how to switch:

# See current model
openclaw config get agents.defaults.model

# Switch to a specific model
openclaw config set agents.defaults.model openrouter/anthropic/claude-sonnet-4
openclaw config set agents.defaults.model openrouter/google/gemini-2.0-flash
openclaw config set agents.defaults.model openrouter/meta-llama/llama-3.1-70b-instruct

Model Recommendations by Use Case

Use Case Model Cost Why
General tasks openrouter/auto Varies OpenRouter picks the best model automatically
Coding & technical claude-sonnet-4 $$ Best at understanding code and making changes
Free/budget llama-3.1-8b-instruct Free Good quality, zero API cost
Complex reasoning claude-opus-4 $$$ Most capable but expensive
Fast responses gemini-2.0-flash $ Quick and cheap for simple tasks

Changing Your Gateway

# Switch gateway provider
openclaw config set gateway.provider openrouter
openclaw config set gateway.provider openai
openclaw config set gateway.provider anthropic

# Update API key
openclaw config set gateway.apiKey YOUR-NEW-KEY

# Restart gateway to apply changes
openclaw daemon restart

Troubleshooting Common Issues

“openclaw: command not found”

# Reinstall globally
npm install -g openclaw

# If that doesn't work, check your PATH
npm config get prefix
# Add that path to your system PATH variable

“Gateway failed to start”

# Check if something else is using the port
openclaw config get gateway.port
# Default is 18789. If blocked:
openclaw config set gateway.port 19001
openclaw daemon restart

“API key invalid” or “Authentication failed”

# Verify your key is set correctly
openclaw config get gateway.apiKey
# Should show your key (redacted). If wrong:
openclaw config set gateway.apiKey sk-or-YOUR-CORRECT-KEY

“Model not found” or “403 Forbidden”

# The model name might be wrong. Check available models:
# For OpenRouter, browse openrouter.ai/models
openclaw config set agents.defaults.model openrouter/auto

Agent is slow or unresponsive

  • Check your internet connection
  • Switch to a faster model (gemini-2.0-flash or llama-3.1-8b)
  • Restart the gateway: openclaw daemon restart
  • Check gateway logs: openclaw daemon logs

Gateway crashes or freezes

# Full reset
openclaw daemon stop
# Wait 5 seconds
openclaw daemon start

# Nuclear option — kill all and restart
openclaw daemon stop --force
openclaw daemon start

Cost Optimization: Running Agents Cheaply

AI API costs can add up. Here’s how to keep them minimal:

  • Use free models: OpenRouter offers Llama 3.1, Mistral, and other models at $0 cost
  • Use openrouter/auto: Automatically picks the cheapest model that can handle your task
  • Run local models: Install Ollama and use models with zero API cost forever
  • Monitor spending: Check your OpenRouter dashboard for usage
  • Set budget limits: OpenRouter lets you set monthly spending caps

Running 100% Free with Ollama

# Install Ollama from ollama.com, then:
ollama run llama3.1

# Point OpenClaw to your local Ollama
openclaw config set gateway.provider ollama
openclaw config set agents.defaults.model llama3.1

Now your agents run entirely on your machine with zero API costs. Trade-off: quality depends on your hardware. 8GB RAM runs the small model; 16GB+ runs the 70B model with much better results.

Productivity Power Moves

Multi-Agent Workflows

# Run multiple agents for different tasks
openclaw agents create researcher --model gemini-2.0-flash
openclaw agents create writer --model claude-sonnet-4
openclaw agents create coder --model claude-sonnet-4

Scheduled Tasks

# Run an agent on a schedule
openclaw cron create --schedule "0 9 * * *" --prompt "Check my email and summarize anything urgent"

Auto-Start on Boot

Add OpenClaw gateway to your Windows Startup folder so it’s always running:

# Create a startup script
echo openclaw daemon start > "%APPDATA%MicrosoftWindowsStart MenuProgramsStartupopenclaw-gateway.bat"

Your First Week with OpenClaw

Day Task Time
1 Install Node.js + OpenClaw, configure, start gateway 30 min
2 Run your first agent, try 5 different prompts 20 min
3 Switch models — try free (Llama), mid (Gemini), and premium (Claude) 15 min
4 Have the agent work with your actual files and projects 25 min
5 Set up a recurring task or automation 20 min
6 Try running a local model via Ollama for zero-cost operation 30 min
7 Build your first multi-agent workflow 25 min

Master AI Agents with Our Complete Guide Collection

Setup guides, troubleshooting, advanced workflows, and productivity strategies for every major AI agent framework.

Browse Agent Guides →

1 review for How to Install OpenClaw on Windows

  1. Rated 5 out of 5

    James Giler (verified owner)

    As someone who was skeptical about AI, this guide changed my mind. Clear explanations, real examples, and I actually understand how to use these tools now.

Add a review

Your email address will not be published. Required fields are marked *

Scroll to Top