guide

How to Install OpenClaw

Step-by-step guide to installing OpenClaw on macOS, Windows, and Linux. Learn how to set up the CLI, configure the gateway, and deploy your first AI agent.

OpenClaw is an open-source AI agent framework with over 100,000 GitHub stars. This guide walks you through installing OpenClaw on your local machine, configuring the gateway, and getting your first AI agent running.

💡Prerequisites: Node.js v22+, pnpm (recommended), and a terminal. Windows users need WSL2 (Ubuntu recommended).

Step 1: Install the OpenClaw CLI

The fastest way to install OpenClaw is using the official installer script. Open your terminal and run:

bash
curl -fsSL https://openclaw.ai/install.sh | bash

For Windows (PowerShell):

powershell
iwr -useb https://openclaw.ai/install.ps1 | iex

Alternatively, install via npm or pnpm:

bash
npm install -g openclaw
# or
pnpm add -g openclaw

Step 2: Run the Onboarding Wizard

The onboarding wizard guides you through initial configuration. It sets up your gateway, authentication, and daemon:

bash
openclaw onboard --install-daemon

The wizard will configure:

1

Gateway Mode

Choose between local (your machine) or remote gateway deployment.

2

Authentication

Set up OpenAI subscription via OAuth, or configure your own API keys.

3

Chat Providers

Select which channels to enable: WhatsApp, Telegram, Discord, or Mattermost.

4

Daemon Installation

Install as a background service (launchd on macOS, systemd on Linux).

Step 3: Start the Gateway

If you installed the daemon, check its status. Otherwise, start the gateway manually:

bash
# Check daemon status
openclaw gateway status

# Or start manually in foreground
openclaw gateway --port 18789 --verbose

Once running, access the dashboard at http://127.0.0.1:18789/ to monitor your agents.

Step 4: Verify Installation

Run these commands to verify everything is working correctly:

bash
# Check overall status
openclaw status

# Health check
openclaw health

# Security audit
openclaw security audit --deep
You've successfully installed OpenClaw! Next, connect a chat channel like WhatsApp or Telegram.

Troubleshooting Common Issues

Node.js version error

OpenClaw requires Node.js v22 or higher. Run `node --version` to check. Update via nvm: `nvm install 22 && nvm use 22`.

Permission denied errors

Run `openclaw doctor --fix` to automatically fix file permissions. OpenClaw stores config in ~/.openclaw/ which needs proper permissions.

Gateway won't start

Check if port 18789 is in use: `lsof -i :18789`. Kill any conflicting process or change the port in config.

Skip the setup entirely

Deploy OpenClaw to your own server in 1 click. No CLI, no configuration, no DevOps required.

Deploy with clawd.new →
How to Install OpenClaw - Complete Setup Guide (2025) | clawd.new