How to Install OpenClaw: Step-by-Step Tutorial

Getting OpenClaw running is surprisingly simple. The entire platform is a Node.js application โ€” no GPU required, no complex dependencies, no Docker wizardry (unless you want it). In this guide, I'll walk through every installation method so you can pick the one that matches your setup.

Prerequisites

Before you start, make sure you have:

That's it. No GPU, no CUDA, no 32GB of RAM. The gateway is lightweight โ€” it orchestrates, it doesn't compute. The heavy lifting happens on the AI provider's servers.

Method 1: Homebrew (macOS โ€” Recommended)

If you're on a Mac, this is the fastest path:

# Install OpenClaw brew install openclaw # Verify installation openclaw --version # Start the gateway openclaw gateway start # Check status openclaw gateway status

That's genuinely it. Homebrew handles dependencies, creates the workspace directory at ~/.openclaw/workspace/, and sets up the CLI. The gateway starts as a background daemon.

Method 2: npm (Cross-Platform)

Works on macOS, Linux, and Windows (via WSL):

# Install globally via npm npm install -g openclaw # Or use npx to run without global install npx openclaw gateway start

The npm method is the most portable. If you have Node.js, you have OpenClaw. This is also the recommended approach for VPS deployments.

Method 3: Docker

If you prefer containerized deployments:

# Pull the official image docker pull openclaw/gateway:latest # Run with your workspace mounted docker run -d \ --name openclaw \ -v ~/.openclaw:/root/.openclaw \ -p 3000:3000 \ openclaw/gateway:latest

Docker is ideal for users who want isolation or are deploying alongside other services. The mounted volume ensures your workspace files persist between container restarts.

Method 4: Manual / From Source

For developers who want to inspect or modify the code:

# Clone the repository git clone https://github.com/openclaw/openclaw.git cd openclaw # Install dependencies npm install # Start the gateway npm start

Building from source gives you full access to the codebase. This is the MIT-licensed, open-source project โ€” you can fork it, modify it, contribute to it, or just read the code to understand what's happening under the hood.

Post-Installation Setup

Once the gateway is running, you need to configure three things:

1. Set Up Your AI Model

OpenClaw needs at least one AI model to function. The most common choices:

# Configure via the CLI openclaw config set model.default "anthropic/claude-sonnet-4" openclaw config set model.apiKey "sk-ant-..." # Or set environment variables export ANTHROPIC_API_KEY="sk-ant-..." export OPENAI_API_KEY="sk-..."

You can use any combination of providers. Many users set up multiple models and route different tasks to different models based on cost and capability.

2. Connect Your First Channel

Your agent needs somewhere to talk. Telegram is the easiest first channel:

# Add Telegram channel openclaw channel add telegram # Follow the prompts to enter your bot token # (Get a token from @BotFather on Telegram)

For other channels, see our WhatsApp guide or the complete guide.

3. Create Your Workspace Files

The workspace at ~/.openclaw/workspace/ defines your agent. At minimum, create these files:

# Create the essential files cd ~/.openclaw/workspace # SOUL.md โ€” Your agent's personality cat > SOUL.md << 'EOF' # Who I Am I am a helpful, direct personal assistant. I value clarity over verbosity. I lead with the answer, then explain if needed. EOF # USER.md โ€” Context about you cat > USER.md << 'EOF' # About My Human Name: [Your Name] Timezone: [Your Timezone] Key context: [Anything your agent should always know] EOF

These files are just the starting point. Read our SOUL.md deep dive and Building Your First Agent tutorial for complete guidance on crafting these files.

๐Ÿ“– Complete Setup in the Book

The Personal Agent Revolution includes complete, ready-to-use configuration files โ€” SOUL.md templates, AGENTS.md examples, and advanced workspace setups tested over hundreds of hours.

Get the Book โ€” $29.95 โ†’

Verify Everything Works

Let's confirm your installation:

# Check gateway status openclaw gateway status # You should see: # Gateway: running # Model: anthropic/claude-sonnet-4 # Channels: telegram (connected) # Workspace: /Users/you/.openclaw/workspace

Now open Telegram, find your bot, and send it a message. If everything is configured correctly, your agent will respond. Congratulations โ€” you have a personal AI agent running on your hardware.

Keeping OpenClaw Running 24/7

For the agent to be always available, the gateway needs to stay running. Here are the common approaches:

macOS: launchd (Automatic)

The Homebrew installation typically sets up a launchd service automatically. If not:

# Enable auto-start on macOS openclaw gateway enable

Linux/VPS: pm2 (Recommended)

pm2 is a Node.js process manager that handles restarts, logging, and monitoring:

# Install pm2 npm install -g pm2 # Start OpenClaw with pm2 pm2 start openclaw -- gateway start # Save so it survives reboot pm2 save pm2 startup

Linux/VPS: systemd

For systemd-based Linux distributions:

# Create a systemd service file sudo cat > /etc/systemd/system/openclaw.service << 'EOF' [Unit] Description=OpenClaw Gateway After=network.target [Service] Type=simple User=your-username ExecStart=/usr/local/bin/openclaw gateway start --foreground Restart=always RestartSec=10 [Install] WantedBy=multi-user.target EOF # Enable and start sudo systemctl enable openclaw sudo systemctl start openclaw

Common Installation Issues

Node.js Version Too Old

OpenClaw requires Node.js 18+. If you're on an older version:

# Using nvm (recommended) nvm install 20 nvm use 20 # Or update via Homebrew brew upgrade node

Permission Errors on npm Global Install

If you get EACCES errors:

# Fix npm permissions (don't use sudo) mkdir -p ~/.npm-global npm config set prefix '~/.npm-global' export PATH=~/.npm-global/bin:$PATH

Gateway Won't Start

Check the logs:

# View gateway logs openclaw gateway logs # Common fix: port already in use openclaw gateway stop openclaw gateway start

Channel Connection Fails

Most channel issues are authentication-related. Double-check your bot token (Telegram) or phone number linking (WhatsApp). Our Telegram and WhatsApp guides cover troubleshooting in detail.

Recommended VPS Providers

If you don't have a Mac Mini or Linux server at home, a VPS works perfectly:

Any of these will run OpenClaw comfortably. The gateway is lightweight โ€” most of the CPU and memory usage goes to the Node.js runtime itself, not the OpenClaw application.

Next Steps

You've got OpenClaw installed and running. Here's your roadmap:

  1. Craft Your SOUL.md โ€” Give your agent a real personality
  2. Build Your First Agent โ€” Complete workspace configuration
  3. Set Up Memory โ€” Enable persistent context
  4. Add Skills โ€” Web search, file access, browser control
  5. Enable Automation โ€” Morning briefings, scheduled tasks

Frequently Asked Questions

Node.js 18+, macOS/Linux/Windows (WSL). No GPU required. 512MB+ RAM. A $5/mo VPS works fine.
2-3 minutes for the install. 5-10 minutes for channel setup. About an hour for full workspace configuration.
Yes. Any VPS with Node.js 18+ works. DigitalOcean, Linode, Hetzner, AWS โ€” all supported. Use pm2 or systemd to keep it running.
No. OpenClaw connects to cloud AI providers via their APIs. For fully local operation, you can optionally use Ollama, but that requires a GPU.
๐Ÿ‘จโ€๐Ÿ’ป

Rudi Ribeiro Jr.

Early OpenClaw Adopter ยท HubSpot AE ยท Author of The Personal Agent Revolution

Rudi runs a personal AI agent daily and wrote The Personal Agent Revolution based on hundreds of hours of real-world experience. He is not the creator of OpenClaw โ€” he's a power user who documented everything he learned.

๐Ÿ“– Master OpenClaw with the Book

37 chapters, 187 pages, 3 bonus resources. Everything you need to build and run a personal AI agent.

Get the Book โ€” $29.95 โ†’