Getting Started with OpenClaw: Complete Setup Guide for Mac, Windows & Linux
What is OpenClaw?
OpenClaw is the fastest-growing open-source AI agent platform, designed to run autonomous tasks on your machine. With over 191,000 GitHub stars and 21,000+ active instances worldwide, it has rapidly become the go-to framework for personal AI automation.
This guide walks you through installing OpenClaw on macOS, Windows, and Linux, then configuring it for first use.
Prerequisites
Before installing OpenClaw, make sure you have:
- Node.js 20+ (or Bun 1.1+)
- Git installed and configured
- 4GB RAM minimum (8GB recommended)
- An API key from a supported LLM provider (OpenAI, Anthropic, or local models via Ollama)
Installation on macOS
The fastest way to install on macOS is via Homebrew:
brew install openclaw
Alternatively, you can install from source:
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
npm run build
npm link
Verify the installation:
claw --version
Installation on Windows
For Windows, we recommend using the official installer or WSL2.
Option 1: Official installer
Download the latest .msi installer from the OpenClaw releases page and run it. The installer adds claw to your PATH automatically.
Option 2: WSL2
If you use Windows Subsystem for Linux, follow the Linux instructions below inside your WSL2 environment.
Option 3: npm
npm install -g openclaw
Installation on Linux
Most Linux distributions can install via npm:
npm install -g openclaw
For Debian/Ubuntu, there is also an official APT repository:
curl -fsSL https://repo.openclaw.dev/gpg | sudo gpg --dearmor -o /usr/share/keyrings/openclaw.gpg
echo "deb [signed-by=/usr/share/keyrings/openclaw.gpg] https://repo.openclaw.dev stable main" | sudo tee /etc/apt/sources.list.d/openclaw.list
sudo apt update && sudo apt install openclaw
Initial Configuration
Once installed, run the setup wizard:
claw init
This walks you through:
- Choosing an LLM provider — Select OpenAI, Anthropic, or a local model
- Setting your API key — Stored securely in
~/.config/openclaw/config.yaml - Configuring permissions — Choose what OpenClaw can access (file system, network, etc.)
- Installing starter skills — Optionally install recommended skills
Verifying Your Setup
Run a quick test to make sure everything works:
claw run "What is 2 + 2?"
If you see a response, congratulations — OpenClaw is up and running!
Recommended Next Steps
- Browse our Skills Directory to find useful skills
- Read our guide on Installing and Managing Skills Safely
- Join the OpenClaw Discord community for support
Troubleshooting Common Issues
"Command not found" after installation
Make sure your npm global bin directory is in your PATH. Run npm bin -g to find the path, then add it to your shell profile.
API key errors
Double-check your API key in ~/.config/openclaw/config.yaml. Make sure there are no trailing spaces or line breaks.
Permission denied errors
On Linux/macOS, you may need to adjust file permissions:
chmod 600 ~/.config/openclaw/config.yaml
High memory usage
If OpenClaw is using too much RAM, try reducing the context window size in your config:
model:
max_context: 4096