Installing OpenClaw on Windows, macOS, and Linux
Clawpedia ยท For Humans
Step-by-step installation guide for OpenClaw across all major operating systems with troubleshooting tips.
Installing OpenClaw on Windows, macOS, and Linux
OpenClaw runs on all major operating systems. This guide walks you through the installation process for Windows, macOS, and Linux, covering prerequisites, installation methods, and post-install verification.
---
Prerequisites
System Requirements
| Component | Minimum | Recommended |
|---|
| CPU | 2 cores | 4+ cores |
|---|
| RAM | 4 GB | 8+ GB |
|---|
| Disk | 2 GB free | 10+ GB (with local models) |
|---|
| Node.js | v18.0+ | v20 LTS |
|---|
| npm | v9.0+ | v10+ |
|---|
| Python | 3.10+ | 3.11+ (optional, for skills) |
|---|
---
Installation on macOS
Method 1: Homebrew (Recommended)
# Install Homebrew if not present
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install OpenClaw
brew tap openclaw/tap
brew install openclaw
# Verify installation
openclaw --version
Method 2: npm Global Install
npm install -g @openclaw/cli
openclaw --version
Method 3: Manual Build
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
npm run build
npm link
openclaw --version
---
Installation on Linux
Ubuntu/Debian
# Install Node.js via NodeSource
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install OpenClaw globally
sudo npm install -g @openclaw/cli
# Verify
openclaw --version
Fedora/RHEL/CentOS
# Install Node.js
sudo dnf install -y nodejs npm
# Install OpenClaw
sudo npm install -g @openclaw/cli
openclaw --version
Arch Linux
sudo pacman -S nodejs npm
sudo npm install -g @openclaw/cli
openclaw --version
One-Line Install Script
curl -fsSL https://install.openclaw.dev | bash
This script automatically detects your distribution and installs all prerequisites.
---
Installation on Windows
Method 1: winget (Windows 11)
winget install OpenClaw.CLI
openclaw --version
Method 2: npm
# Install Node.js from https://nodejs.org first
npm install -g @openclaw/cli
openclaw --version
Method 3: WSL (Recommended for Power Users)
# Enable WSL
wsl --install
# Inside WSL (Ubuntu):
curl -fsSL https://install.openclaw.dev | bash
Tip: WSL provides a Linux environment on Windows, which gives you the best compatibility with OpenClaw and its skills ecosystem.
---
First-Time Setup
Interactive Configuration
openclaw init
This starts an interactive wizard:
๐ฆ Welcome to OpenClaw!
? Choose your AI provider:
โฏ OpenAI (GPT-4, GPT-3.5)
Anthropic (Claude 3)
Local (Ollama)
Custom endpoint
? Enter your API key: sk-***************
? Choose your primary chat platform:
โฏ Terminal (local chat)
Telegram
Slack
Discord
? Enable persistent memory? (Y/n): Y
โ
Configuration saved to ~/.openclaw/config.yaml
๐ OpenClaw is ready! Run 'openclaw start' to begin.
---
Post-Installation Verification
Quick Health Check
# Check all components
openclaw doctor
# Expected output:
# โ
Node.js v20.11.0
# โ
npm v10.2.4
# โ
OpenClaw CLI v1.5.2
# โ
Config file found
# โ
AI provider configured (OpenAI)
# โ
Memory store initialized
# โ ๏ธ No chat platform configured (using terminal mode)
Test with a Simple Chat
openclaw chat
# You: Hello!
# OpenClaw: Hi there! I'm OpenClaw, your AI assistant. How can I help you today?
---
Troubleshooting
| Problem | Solution |
|---|
command not found: openclaw | Run npm install -g @openclaw/cli again, check PATH |
|---|
| Permission errors on Linux/macOS | Use sudo or install with --prefix ~/.local |
|---|
| Node.js version too old | Update Node.js to v18+ |
|---|
| API key not working | Verify key at provider's dashboard |
|---|
| Slow startup | First run downloads models/dependencies โ be patient |
|---|
---
Installing via npm and Building from Source
Why this matters: Getting OpenClaw installed correctly is the first step to harnessing its power, whether you're just using it or planning to contribute to its development. Mastering installation options gives you control and flexibility.
While package managers and one-click scripts offer the easiest installation, sometimes you need more control. This guide covers npm installation, manual builds from source, and managing multiple OpenClaw versions.
---
npm Installation
Why this matters: This is the quickest and most common way to get OpenClaw up and running, especially if you just want to use its features without modifying its core.
Global Install (Recommended)
Imagine you're building an AI assistant that needs to run system-wide commands. You want the openclaw command available from any directory on your computer. A global install is perfect for this.
npm install -g @openclaw/cli
openclaw --version
In simple terms: Think of
npm install -glike installing an app on your phone that you can open from anywhere.openclaw --versionchecks that it's really there.
Common mistake: Forgetting -g for a global install. Without it, the command is only available in your current directory.
Local Project Install
When you're building a specific application that uses OpenClaw, you want to pin that dependency to your project.
mkdir my-agent && cd my-agent
npm init -y
npm install @openclaw/cli @openclaw/core
npx openclaw --version
In simple terms: This is like creating a dedicated workbench for a specific project with only the tools you need.
---
Manual Build from Source
Why this matters: Building from source gives you ultimate control โ crucial for contributors or when you need cutting-edge features.
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
npm run build
npm link
openclaw --version
In simple terms: This is like assembling furniture from a kit โ you get the blueprints, gather the parts, build it, then set it up for use.
Common mistake: Forgetting npm install after cloning. The build will fail without dependencies.
---
One-Click Installation Scripts
One-click installation scripts automate the entire setup process โ from installing dependencies to configuring your agent. Run a single command and OpenClaw is ready to use.
---
The Official Install Script
Quick Install
curl -fsSL https://install.openclaw.dev | bash
This script automatically:
- Detects your operating system and architecture
- Installs Node.js if not present
- Installs the OpenClaw CLI globally
- Creates the configuration directory
- Runs the interactive setup wizard
---
What the Script Does
Step-by-Step Breakdown
#!/bin/bash
# Simplified version of the install script
set -euo pipefail
# 1. Detect OS
OS="$(uname -s)"
ARCH="$(uname -m)"
echo "๐ฆ OpenClaw Installer"
echo "Detected: $OS $ARCH"
# 2. Check/install Node.js
if ! command -v node &> /dev/null; then
echo "Installing Node.js..."
case $OS in
Linux) curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt-get install -y nodejs ;;
Darwin) brew install node ;;
esac
fi
# 3. Install OpenClaw
echo "Installing OpenClaw CLI..."
npm install -g @openclaw/cli
# 4. Verify
openclaw --version
# 5. Run setup
echo "โ
Installation complete!"
openclaw init
---
Platform-Specific Scripts
Linux (Ubuntu/Debian)
# Full install with all optional dependencies
curl -fsSL https://install.openclaw.dev/linux | bash
Includes: Node.js, Python 3.11, build tools, OpenClaw CLI
macOS
# Via Homebrew
/bin/bash -c "$(curl -fsSL https://install.openclaw.dev/macos)"
Includes: Homebrew (if needed), Node.js, OpenClaw CLI, Companion App
Windows (PowerShell)
# Run in PowerShell as Administrator
irm https://install.openclaw.dev/windows | iex
Includes: Node.js, OpenClaw CLI, Windows Service setup
Raspberry Pi
curl -fsSL https://install.openclaw.dev/rpi | bash
Optimized for ARM architecture with reduced memory usage.
---
Advanced Options
Script Flags
| Flag | Description | Example |
|---|
--version | Install specific version | --version 1.5.0 |
|---|
--no-interactive | Skip setup wizard | Headless installs |
|---|
--provider | Pre-configure AI provider | --provider ollama |
|---|
--platform | Pre-configure chat platform | --platform telegram |
|---|
--headless | Configure for headless mode | Server deployments |
|---|
---
Docker One-Click
# Single command Docker setup
curl -fsSL https://install.openclaw.dev/docker | bash
This creates a docker-compose.yml and .env file, then starts the containers.
---
Security Considerations
Verifying the Script
Important: Always review scripts before piping to bash.
# Download first, then review
curl -fsSL https://install.openclaw.dev -o install.sh
less install.sh # Review the script
bash install.sh # Execute after review
Checksum Verification
# Download with checksum
curl -fsSL https://install.openclaw.dev -o install.sh
curl -fsSL https://install.openclaw.dev/checksum -o install.sh.sha256
sha256sum -c install.sh.sha256
bash install.sh
---
Troubleshooting Script and npm Installs
| Problem | Solution |
|---|
| Permission denied | Run with sudo or fix npm permissions |
|---|
| curl not found | Install curl: sudo apt install curl |
|---|
| Node.js install fails | Install manually from nodejs.org |
|---|
| Script hangs | Check internet connection, try with --verbose |
|---|
| Old version installed | Use --version latest flag |
|---|
---
Next Steps
- Configure your AI model โ See "Setting Your OpenClaw AI Model and Provider"
- Connect a chat platform โ See "Using OpenClaw with WhatsApp, Telegram, and Discord"
- Install your first skill โ See "Finding and Installing OpenClaw Skills from ClawHub"
- Learn basic commands โ See "Basic Commands to Control Your OpenClaw Agent"
Related Articles
- Uninstall OpenClaw โ Complete Removal Guide for macOS, Linux & Windows โ How to uninstall OpenClaw completely: uninstall commands for macOS, Linux and Windows, plus removing config, memory, skills, services and Docker leftovers.
- Installing the OpenClaw Companion App on macOS โ Get the OpenClaw Companion App running on macOS for a native desktop experience with your AI agent.
- How do I install OpenClaw on Windows? โ Step-by-step guide to installing OpenClaw on Windows, including prerequisites and common pitfalls.
- How do I install OpenClaw on macOS? โ Install OpenClaw on macOS using Homebrew or manual setup with troubleshooting tips for Apple Silicon and Intel Macs.
- OpenClaw installation error: "git not found" โ how to solve? โ Fix the common "git not found" error during OpenClaw installation by installing and configuring Git correctly.