How to Install OpenClaw 2026: Step-by-Step Tutorial + 15 First Commands (Mac/Windows/Linux)

How to Install OpenClaw 2026: Step-by-Step Tutorial + 15 First Commands (Mac/Windows/Linux)

impossible to

possible

Make

Make

Make

dreams

dreams

dreams

happen

happen

happen

with

with

with

AI

AI

AI

LucyBrain Switzerland ○ AI Daily

How to Install OpenClaw 2026: Step-by-Step Tutorial + 15 First Commands (Mac/Windows/Linux)

February 24, 2026

TL;DR: Install OpenClaw

Time: 30-60 minutes
Requirements: Terminal knowledge, Node.js 22+
Platforms: Mac (best), Linux, Windows (WSL2)
Cost: Free software, $20/mo AI model
Difficulty: Medium-Hard (technical users)
This guide: Complete step-by-step + first commands

Installing OpenClaw isn't click-and-go.

Here's exactly how to do it right.

Before You Start

Requirements Check

Technical skills needed: ✓ Comfortable with terminal/command line
✓ Can follow instructions precisely
✓ Basic understanding of: paths, environment variables
✓ Patience (expect hiccups)

If you're not technical: Consider hiring someone or waiting for easier installers

Hardware Requirements

Minimum:

  • 4GB RAM

  • 10GB storage

  • Always-on device (or cloud server)

Recommended:

  • 8GB+ RAM

  • 20GB storage

  • Mac mini M2 OR dedicated Linux box

  • Stable internet

Why always-on: OpenClaw runs 24/7 in background

Software Requirements

Essential:

  • Node.js v22 or higher

  • npm or pnpm (package manager)

  • Terminal access

Platform-specific:

  • Mac: macOS 12+ (Monterey or newer)

  • Linux: Ubuntu 22.04+ or similar

  • Windows: WSL2 (Windows Subsystem for Linux 2)

Account Requirements

AI Model (pick one):

  • Claude Pro ($20/month) - Recommended

  • ChatGPT Plus/API ($20/month)

  • OpenRouter account (pay-per-use)

  • OR local model setup (advanced)

Messaging App (pick one):

  • Telegram (easiest)

  • WhatsApp (popular)

  • Discord (for devs)

  • Slack (for work)

  • Signal/iMessage (also supported)

Installation: Mac (Recommended)

Step 1: Install Homebrew

Check if installed:

brew --version

If not installed:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Time: 5-10 minutes

Step 2: Install Node.js 22

brew install node

Verify installation:

node --version
# Should show: v22.x.x

Time: 5 minutes

Step 3: Install OpenClaw

Using npm (standard):

npm install -g

Using pnpm (faster, recommended):

npm install -g pnpm
pnpm add -g

Verify:

openclaw --version

Time: 2-5 minutes

Step 4: Run Setup Wizard

Launch wizard:

openclaw onboard --install-daemon

What this does:

  1. Creates workspace folder

  2. Installs background service (daemon)

  3. Generates config files

  4. Guides through setup

Follow prompts:

  • Choose workspace location (default: ~/.openclaw)

  • Set authentication method

  • Configure channels

  • Choose AI model

Time: 15-30 minutes (interactive)

Step 5: Start Gateway

If daemon installed: Gateway starts automatically

Check status:

Manual start (if needed):

openclaw gateway --port 18789 --verbose

Logs location: ~/.openclaw/logs/gateway.log

Step 6: Connect Messaging App

We'll use Telegram (easiest):

A. Get Telegram Bot Token:

  1. Open Telegram

  2. Message @BotFather

  3. Send: /newbot

  4. Follow prompts (name your bot)

  5. Copy token (looks like: 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz)

B. Add to OpenClaw:

openclaw channel add telegram --token

C. Start chat:

  1. Find your bot in Telegram

  2. Send: /start

  3. OpenClaw responds

Time: 5 minutes

Step 7: Connect AI Model

For Claude:

A. Get API key:

  1. Go to console.anthropic.com

  2. Create API key

  3. Copy key

B. Add to OpenClaw:

openclaw model add claude --api-key

Alternative: Claude Pro (simpler): If you have Claude Pro subscription, use OAuth flow:

openclaw model add claude --oauth

Time: 5 minutes

Step 8: Test Installation

Send test message:

In Telegram (to your bot):

OpenClaw should respond with its capabilities.

Success! Installation complete.

Installation: Linux (Ubuntu/Debian)

Step 1: Update System

sudo apt update && sudo apt upgrade -y

Step 2: Install Node.js 22

Add NodeSource repository:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -

Install Node:

sudo apt install -y

Verify:

node --version
npm --version

Step 3: Install OpenClaw

sudo npm install -g

If permission issues:

sudo chown -R $(whoami) ~/.npm
npm install -g

Step 4: Setup & Configuration

Run onboarding:

openclaw onboard --install-daemon

Systemd service (auto-start on boot): Created automatically by daemon installer

Check service:

systemctl --user

Step 5-8: Same as Mac

Follow Mac steps 5-8 for:

  • Starting gateway

  • Connecting messaging app

  • Connecting AI model

  • Testing

Installation: Windows (WSL2)

Step 1: Install WSL2

Open PowerShell as Admin:

wsl --install

Restart computer

Set default to WSL2:

wsl --set-default-version 2

Install Ubuntu:

wsl --install -d Ubuntu-22.04

Step 2: Enter Ubuntu

Launch:

wsl

Now you're in Linux

Step 3: Follow Linux Steps

Use Ubuntu/Linux instructions above

Key difference: Gateway runs inside WSL, but you access from Windows

Installation: Docker (Advanced)

Quick Start

docker run -d \
  --name openclaw \
  -v ~/.openclaw:/root/.openclaw \
  -p 18789

Configuration: Mount your config:

docker exec -it

Best for: Cloud deployments, isolated testing

Installation: DigitalOcean 1-Click

Easiest Cloud Method

1. Go to DigitalOcean Marketplace

2. Search "OpenClaw"

3. Click "Create OpenClaw Droplet"

4. Choose plan:

  • Basic: $6/month (testing)

  • Recommended: $12/month (production)

5. SSH into droplet:

ssh

6. Run setup:

Pre-configured with: ✓ Node.js 22 ✓ OpenClaw latest ✓ Security hardening ✓ Automatic updates

Time: 10 minutes total

Authentication Setup (CRITICAL)

Never Use auth: none

Old way (REMOVED):

auth: none # DANGEROUS - removed in 2026

This is now IMPOSSIBLE and was a security nightmare

Choose Authentication

Option 1: Token (Recommended)

Generate secure token:

openssl rand -hex 32

Add to config:

auth: token
token

Use in API calls:

curl -H "Authorization: Bearer YOUR_TOKEN"

Option 2: Password

auth: password
password

Less secure than tokens but simpler

Option 3: Tailscale (Advanced)

If using Tailscale VPN:

auth

Uses Tailscale identity for authentication

Configuration File

Location

Default: ~/.openclaw/config.yaml

Essential Settings

# Authentication
auth: token
token: abc123def456...

# AI Model
model:
  provider: claude
  apiKey: sk-ant-...
  model: claude-opus-4-6

# Channels
channels:
  telegram:
    enabled: true
    token: 1234567890:ABC...
    dmPolicy: pairing

# Features
features:
  voice: false
  canvas: false
  
# Safety
safety:
  maxTokensPerDay: 100000
  allowShellCommands: false # Safer

Connecting Multiple Apps

WhatsApp Setup

Requires: WhatsApp Business API OR third-party bridge

Using WhatsApp Web bridge:

openclaw channel add whatsapp --qr

Scan QR code with WhatsApp

Note: Unofficial, use with caution

Discord Setup

A. Create Discord Bot:

  1. Go to discord.com/developers

  2. Create application

  3. Add bot

  4. Copy token

B. Add to OpenClaw:

openclaw channel add discord --token

C. Invite bot to server: Use invite URL from Discord developer portal

Slack Setup

A. Create Slack App:

  1. Go to api.slack.com/apps

  2. Create New App

  3. Add Bot User OAuth Token

B. Add to OpenClaw:

openclaw channel add slack --token

15 Essential First Commands

Test Commands (5)

Command 1: Hello

Tests: Basic response, model connection

Command 2: System check

Tests: System awareness

Command 3: Memory test

Tests: Context retention

Command 4: Time awareness

Tests: Time/date functions

Command 5: Skill check

Tests: Skills system

Practical Commands (10)

Command 6: Calendar

Command 7: Email count

Command 8: Set reminder

Command 9: Create note

Create note: OpenClaw installation completed successfully on [date]

Command 10: Weather

What's the weather in [your city]

Command 11: Task creation

Command 12: Quick calculation

Command 13: Web search

Command 14: File operations

Command 15: Schedule automation

Troubleshooting

Issue 1: Command not found

Error: openclaw: command not found

Fix:

# Check installation
npm list -g openclaw

# Reinstall if needed
npm install -g openclaw@latest

# Add to PATH (Mac/Linux)
export PATH="$PATH:$(npm config get prefix)/bin"

Issue 2: Node version too old

Error: Node v20 detected, v22+ required

Fix:

# Mac
brew upgrade node@22

# Linux
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y

Issue 3: Gateway won't start

Error: Error: Address already in use

Fix:

# Check what's using port
lsof -i :18789

# Kill process
kill -9 PID_NUMBER

# Or use different port
openclaw gateway --port 18790

Issue 4: AI model not responding

Check:

  1. API key correct?

  2. Account has credits?

  3. Rate limits hit?

Test API key:

Issue 5: Telegram bot not responding

Check:

  1. Token correct?

  2. Bot added to OpenClaw?

  3. Gateway running?

Reset connection:

openclaw channel remove telegram
openclaw channel add telegram --token

Security Checklist

After installation, verify:

✓ Authentication enabled (NOT auth: none)
✓ Strong token/password set
✓ Firewall configured (only port 18789 if needed)
✓ Logs checked for unauthorized access
✓ DM policy set to "pairing" (not "open")
✓ Running on dedicated device OR VM
✓ API keys stored securely

Run security check:

Fixes common misconfigurations

Next Steps

After installation:

  1. Read security guide
    Understand risks, setup safely

  2. Install essential skills
    Email, calendar, task management

  3. Configure automation
    Daily summaries, reminders

  4. Join community
    Discord: discord.gg/openclaw
    GitHub: github.com/openclaw/openclaw

  5. Backup config
    ~/.openclaw/config.yaml → safe place

Upgrading OpenClaw

Check for updates

Upgrade to latest

openclaw update --channel

Channels available

  • stable: Production releases

  • beta: Pre-release testing

  • dev: Bleeding edge (risky)

After upgrade:

openclaw doctor # Check for issues

Frequently Asked Questions

How long does installation take?

30-60 minutes first time, including setup.

Can I install on Raspberry Pi?

Yes, but performance limited. Use Pi 4 (4GB+ RAM).

Do I need to keep terminal open?

No. Daemon runs in background.

Can I run multiple instances?

Yes, but use different ports and workspace folders.

What if I mess up installation?

Uninstall: npm uninstall -g openclaw
Delete: rm -rf ~/.openclaw
Reinstall fresh

How much will AI API cost?

Claude: ~$20/month with Pro
GPT-4 API: $10-50/month depending on usage

Is Windows support good?

WSL2 works well. Native Windows coming later.

Related Reading

www.topfreeprompts.com

Access 80,000+ prompts including OpenClaw commands. Get better results from AI agents with proven templates.

Newest Articles