Wednesday, March 11, 2026

How to Install OpenClaw (Moltbot/Clawdbot) on macOS, Windows, Linux, VPS, and Raspberry Pi

TL;DR

How to Install OpenClaw (Moltbot/Clawdbot) on macOS, Windows, Linux, VPS, and Raspberry Pi

OpenClaw runs on macOS, Linux, and Windows (via WSL). You need Node.js 18+ and an AI model API key. Installation takes under 10 minutes on most platforms. This guide covers every setup scenario: local machines, VPS providers like DigitalOcean and Hetzner, and even Raspberry Pi deployments.

Prerequisites

Before installing OpenClaw on any platform, you need:

  1. Node.js 18 or higher - OpenClaw is built on Node.js. Version 18 is the minimum. Version 20 LTS is recommended for stability
  2. npm or yarn - Comes bundled with Node.js
  3. Git - For cloning the repository
  4. An AI model API key - At least one of: OpenAI, Anthropic, Google, or a local Ollama setup
  5. 8GB+ RAM - Minimum for running OpenClaw with cloud models. 16GB+ if using local models through Ollama

Installing on macOS

macOS is the most straightforward platform for OpenClaw. Most contributors develop on Mac, so it gets the most testing.

Step 1: Install Node.js

Using Homebrew (recommended):

brew install node@20

Or download directly from nodejs.org.

Verify installation:

node --version  # Should show v20.x.x or higher
npm --version   # Should show 10.x.x or higher

Step 2: Install OpenClaw

npm install -g openclaw

Step 3: Run onboarding

openclaw onboard

The onboarding wizard walks you through: - Choosing your AI provider (OpenAI, Anthropic, Google, Ollama) - Entering your API key - Selecting messaging integrations (WhatsApp, Telegram, Slack, Discord) - Configuring the heartbeat schedule

Step 4: Start the agent

openclaw start

Your agent is now running. Send it a message through your configured messaging app.

Installing on Linux

OpenClaw runs on Ubuntu, Debian, Fedora, Arch, and most other distributions.

Step 1: Install Node.js

Using NodeSource (Ubuntu/Debian):

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

Using dnf (Fedora):

sudo dnf install nodejs

Step 2: Install build tools

Some dependencies need compilation:

# Ubuntu/Debian
sudo apt-get install -y build-essential python3

# Fedora
sudo dnf groupinstall "Development Tools"

Step 3: Install and configure OpenClaw

npm install -g openclaw
openclaw onboard
openclaw start

Step 4: Run as a background service (recommended)

Create a systemd service so OpenClaw survives reboots:

sudo tee /etc/systemd/system/openclaw.service << 'EOF'
[Unit]
Description=OpenClaw AI Agent
After=network.target

[Service]
Type=simple
User=your-username
WorkingDirectory=/home/your-username
ExecStart=/usr/bin/openclaw start
Restart=always
RestartSec=10
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl enable openclaw
sudo systemctl start openclaw

Check status:

sudo systemctl status openclaw

Installing on Windows

OpenClaw doesn't run natively on Windows. You need WSL (Windows Subsystem for Linux).

Step 1: Enable WSL

Open PowerShell as Administrator:

wsl --install

This installs Ubuntu by default. Restart your computer when prompted.

Step 2: Set up Ubuntu in WSL

Open the Ubuntu terminal and update packages:

sudo apt update && sudo apt upgrade -y

Step 3: Follow the Linux installation steps

From here, follow the Linux instructions above. Install Node.js, build tools, and OpenClaw inside WSL.

Important notes for Windows users:- OpenClaw runs inside WSL, not in native Windows - File paths use Linux format (/home/user/ not C:\Users\) - iMessage integration doesn't work on Windows (macOS only) - Performance is comparable to native Linux

Setting up on a VPS

Running OpenClaw on a VPS gives you 24/7 uptime without keeping your laptop on. Popular choices are DigitalOcean and Hetzner.

Provider Plan RAM CPU Cost/month
DigitalOcean Basic Droplet 2GB 1 vCPU $12
Hetzner CX22 4GB 2 vCPU ~$4.50
Hetzner CX32 8GB 4 vCPU ~$7.50

For cloud AI models (GPT-4, Claude), 2GB RAM is enough. For local models via Ollama, get at least 8GB.

DigitalOcean setup

  1. Create a Droplet with Ubuntu 22.04
  2. SSH into your server: ssh root@your-server-ip
  3. Create a non-root user:
adduser openclaw
usermod -aG sudo openclaw
su - openclaw
  1. Follow the Linux installation steps above
  2. Set up the systemd service for auto-restart

Hetzner setup

Same process as DigitalOcean. Hetzner offers better pricing for European users.

  1. Create a server with Ubuntu 22.04
  2. SSH in and create a non-root user
  3. Install Node.js and OpenClaw
  4. Configure systemd service

VPS-specific tips

  • Use a firewall: Only open ports you need (SSH on 22, and any messaging webhook ports)
  • Set up fail2ban: Protects against brute-force SSH attacks
  • Enable automatic security updates: sudo apt install unattended-upgrades
  • Monitor resource usage: htop to check CPU and RAM

Setting up on a Raspberry Pi

Yes, OpenClaw runs on a Raspberry Pi. It's a popular choice for an always-on, low-power AI agent.

  • Raspberry Pi 4 (4GB) - Minimum for cloud AI models
  • Raspberry Pi 4 (8GB) - Recommended if you want to try small local models
  • Raspberry Pi 5 - Best performance
  • 32GB+ SD card - Or better, use an SSD via USB for reliability

Installation steps

  1. Flash Raspberry Pi OS (64-bit) using Raspberry Pi Imager
  2. Boot and connect via SSH
  3. Install Node.js:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential
  1. Install OpenClaw:
npm install -g openclaw
openclaw onboard
  1. Set up systemd service (same as Linux VPS)

Pi-specific considerations

  • Use cloud models: Local LLMs are too slow on Pi hardware
  • Swap space: Add 2GB swap if using the 4GB model
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
  • Cooling: OpenClaw can spike CPU during heavy tasks. Use a heatsink or fan case
  • Power: Use the official power supply. Underpowered Pi causes random crashes

Do you need a Mac Mini?

No. A Mac Mini is popular for OpenClaw because it's always-on, quiet, and energy-efficient, but it's not required.

OpenClaw runs on: - Any Mac (MacBook, iMac, Mac Mini, Mac Studio) - Any Linux machine - Windows via WSL - VPS servers - Raspberry Pi

The Mac Mini is a good choice if you want iMessage integration (macOS only) and a dedicated always-on device. A $12/month VPS does the same job for everything except iMessage.

If you don't want to manage any hardware, Anakin offers cloud-hosted AI agents with the same capabilities. No installation, no maintenance, no server costs beyond your subscription.

Node.js requirements

Minimum version: Node.js 18 Recommended version: Node.js 20 LTS

Check your version:

node --version

If you're on an older version, upgrade:

macOS (Homebrew):

brew upgrade node

Linux (NodeSource):

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

Using nvm (any platform):

nvm install 20
nvm use 20

Common Node.js issues: - Node 16 or lower: OpenClaw won't start. Upgrade to 18+ - Multiple Node versions: Use nvm to manage versions - Permission errors on npm install -g: Use nvm instead of system Node, or fix npm permissions

Fixing "command not found" after installation

This is the most common installation issue. You installed OpenClaw but your terminal can't find it.

Cause: npm's global bin directory isn't in your PATH.

Fix 1: Find where npm installed it

npm list -g --depth=0
npm bin -g

Fix 2: Add to PATH

# Add to ~/.bashrc or ~/.zshrc
export PATH="$(npm bin -g):$PATH"

# Reload shell
source ~/.bashrc  # or source ~/.zshrc

Fix 3: Use npx instead

npx openclaw start

Fix 4: Reinstall with nvm

nvm handles PATH automatically:

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

API keys and subscriptions you need

OpenClaw requires at least one AI provider API key:

Provider How to get key Free tier? Cost
OpenAI platform.openai.com $5 credit for new accounts ~$0.01-0.06 per 1K tokens
Anthropic console.anthropic.com Limited free tier ~$0.003-0.075 per 1K tokens
Google ai.google.dev Free tier available Pay per token after free tier
Ollama ollama.com Completely free Your hardware costs only

Optional subscriptions for messaging:- WhatsApp Business API - Free for low volume, paid for high volume - Telegram Bot - Free - Slack Bot - Free for basic usage - Discord Bot - Free

Tip: Start with OpenAI's GPT-3.5 Turbo for testing. It's the cheapest cloud option. Upgrade to GPT-4 or Claude once your workflows are stable.

Or skip API key management entirely with Anakin, which bundles model access into a single platform with 150 free credits to start.

A simpler alternative with Anakin

OpenClaw is powerful but requires technical setup: servers, API keys, Node.js, systemd services, and ongoing maintenance.

If you want AI agent capabilities without the infrastructure overhead, Anakin offers:

  • No installation - Runs in the cloud
  • All models included - GPT-4, Claude, Gemini, Stable Diffusion in one place
  • Visual workflow builder - Create agent logic without code
  • Built-in integrations - Connect to Slack, APIs, and databases
  • Team collaboration - Shared workspaces and credit management

Try it free with 150 credits included. Start building your AI agent today.

FAQ

Q: Can I install OpenClaw without Node.js?No. OpenClaw is a Node.js application. You need Node.js 18+ to run it.

Q: Does OpenClaw work on ARM processors?Yes. It runs on ARM-based Macs (M1/M2/M3/M4) and ARM Linux (Raspberry Pi, ARM VPS).

Q: How much disk space does OpenClaw need?About 500MB for the base installation. Add more if using local models through Ollama (models range from 4GB to 40GB+).

Q: Can I run multiple OpenClaw instances?Yes, but each needs its own configuration directory and port. Useful for separating work and personal agents.

Q: Is Docker supported?Community Docker images exist, but the official recommendation is native installation for the best experience.



from Anakin Blog http://anakin.ai/blog/how-to-install-openclaw-any-platform/
via IFTTT

No comments:

Post a Comment

How to Install OpenClaw (Moltbot/Clawdbot) on macOS, Windows, Linux, VPS, and Raspberry Pi

TL;DR OpenClaw runs on macOS, Linux, and Windows (via WSL). You need Node.js 18+ and an AI model API key. Installation takes under 10 minu...