OpenClaw Installation Guide for macOS, Linux, and Windows

Install OpenClaw locally on macOS, Windows, and Linux with step-by-step instructions. This guide walks you through each setup method and covers common issues you may encounter. If you prefer to skip installation, you can run OpenClaw online using Kimi Claw, with no local setup required.Try Kimi Claw
15 min read·2026-04-07

OpenClaw is a local tool that lets your AI agent connect to apps like Telegram or WhatsApp and take action, such as sending messages or handling tasks. Getting it set up is straightforward once you understand the process. This guide covers installation across macOS, Linux, and Windows.

Table of contents

Quick overview of OpenClaw setup options

Choose the setup that fits your needs. Running OpenClaw locally keeps everything on your own machine and requires installing dependencies such as npm or using an automated script. If you prefer to skip setup, fully hosted platforms like Kimi Claw handle the environment for you, letting you get started directly.

macOS / LinuxWindows
Run locallyOne-line Terminal commandOne-line PowerShell command
Via npmVia npm
Via HomeBrewVia WSL2
Run onlineCloud-based Solution (e.g., Kimi Claw)Cloud-based Solution (e.g., Kimi Claw)

How to install OpenClaw on macOS and Linux

macOS and Linux share the same installer and commands. These instructions apply to both systems unless noted.

Below is a quick setup guide. For a full step-by-step walkthrough with screenshots, see How to install OpenClaw on macOS.

Method 1: Use the one-line installer script

Step 1: Run the installation script in Terminal

Run the official installer script to set up OpenClaw. The script checks whether Node.js 22 or newer is installed. If it is missing or outdated, Node.js 24 will be installed automatically. It then installs the OpenClaw CLI and launches the onboarding wizard.

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

install openclaw on macOS terminal with the one-line script

Step 2: Complete the onboarding wizard

Follow the onboarding wizard to set up your agent environment, including selecting a model provider (e.g., Kimi API), entering your API key, choosing a channel, and configuring basic settings.

choose kimi api

Step 3: Check your installation

Run the following command to confirm your OpenClaw version.

openclaw --version

Step 4: Verify the gateway and complete setup

Run the following command to check that the OpenClaw gateway is active.

openclaw gateway status

The installer also registers a LaunchAgent on macOS or a systemd service on Linux, so OpenClaw continues running in the background. Once everything is set up, your agent is ready to use. You can start chatting, connect tools, or configure workflows based on your needs.

Method 2: Install with Homebrew

Step 1: Install or upgrade Node.js

Use Homebrew to install Node.js by running the following command in Terminal. If Node.js is already installed, run the upgrade command instead to ensure you are using the latest version.

brew install node

install openclaw with homebrew

Step 2: Install the OpenClaw CLI

Run the following command to install the OpenClaw CLI globally.

npm install -g openclaw@latest

Step 3: Run onboarding and set up the daemon

Run the following command to launch the onboarding wizard and register the background daemon. Follow the wizard to configure your agent environment, including selecting a model provider (e.g., Kimi API), entering your API key, and connecting a messaging channel. Once setup is complete, your agent is ready to use. You can start chatting, connect tools, or configure workflows based on your needs.

openclaw onboard --install-daemon

Method 3: Install with npm

Step 1: Verify the runtime version

Run the following command to ensure Node.js 22.14 or later is installed on your system. If your version is up to date, you can proceed with the installation.

node --version

Step 2: Install the OpenClaw CLI

Run the following command to install the OpenClaw CLI globally.

npm install -g openclaw@latest

Step 3: Run onboarding and enable persistence

Run the following command to start the onboarding wizard and register the background daemon. Follow the wizard to configure your agent environment, including selecting a model provider (e.g., Kimi API), entering your API key, and choosing a messaging channel. Once setup is complete, your agent is ready. You can start interacting with it, connect tools, or build workflows based on your needs.

openclaw onboard --install-daemon

Platform notes: OpenClaw supports both Intel and Apple Silicon Macs. If the installation is blocked by Gatekeeper, you can allow it in System Settings under Privacy & Security.

How to install OpenClaw on Windows

Windows offers three main ways to install OpenClaw: the PowerShell installer for a quick native setup, WSL2 for a full Linux environment, and npm for manual installation.

Below is a quick setup guide. For a full step-by-step walkthrough with screenshots, see How to install OpenClaw on Windows.

Method 1: Use the PowerShell installer (native Windows)

Step 1: Run the installer script in PowerShell

Open PowerShell as administrator and run the official one-line script to install OpenClaw.

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

install openclaw on Windows using PowerShell

Step 2: Complete the onboarding wizard

Follow the onboarding steps to configure your agent environment, including selecting a model provider (e.g., Kimi API), entering your API key, and choosing a messaging channel.

choose Kimi K2.5 as the OpenClaw API

Step 3: Verify the installation

Run the following command to confirm that OpenClaw is installed correctly and the gateway is active.

openclaw --version
openclaw gateway status

Step 4: Start using your agent

Once setup is complete, your agent is ready. You can start interacting with it, connect tools, or configure workflows based on your needs.

Run your OpenClaw

Method 2: Install with WSL2

Step 1: Set up the Linux environment

Open PowerShell as administrator and run the following command to enable and initialize WSL2.

wsl --install

Step 2: Run the installer in Linux

Open your Linux terminal and run the standard installation script to install OpenClaw.

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

Step 3: Complete the onboarding wizard

Follow the onboarding steps to configure your agent environment, including selecting a model provider (e.g., Kimi API), entering your API key, and choosing a messaging channel.

Once setup is complete, your agent is ready. You can start interacting with it, connect tools, or configure workflows based on your needs.

Run your OpenClaw

Method 3: Install with npm on Windows

Step 1: Check your Node.js version

Run the following command to verify that Node.js is installed and up to date.

node --version

Step 2: Install the OpenClaw CLI

Run the following command to install the OpenClaw CLI globally.

npm install -g openclaw@latest

Step 3: Run onboarding and enable persistence

Run the following command to start the onboarding wizard and register the background daemon.

openclaw onboard --install-daemon

Follow the onboarding steps to configure your agent environment, including selecting a model provider (e.g., Kimi API), entering your API key, and choosing a messaging channel.

Once setup is complete, your agent is ready. You can start interacting with it, connect tools, or configure workflows based on your needs.

How to run OpenClaw online with Kimi Claw

The methods above require a terminal, a supported Node.js version, and a machine that stays on. Kimi Claw provides a fully hosted option, so you can run OpenClaw without installing or maintaining a local environment.

Step 1: Open Kimi Claw and create an instance

Go to the Kimi Claw page and click Create to start.

open kimi claw web

Step 2: Confirm the deployment

Confirm the deployment in the pop-up window. Kimi Claw will automatically set up your OpenClaw environment, including the gateway and workspace, without requiring any local configuration.

run openclaw online

Step 3: Start using your workspace

Once deployment is complete, your workspace opens in the dashboard. You can start interacting with your agent, set up skills, configure scheduled tasks, and manage files directly in your browser.

start kimi claw in browser

Key features of Kimi Claw

  • Cloud hosting: Kimi Claw runs your gateway in the cloud, so your agent remains available even when your local machine is offline.
  • Automatic maintenance: Updates and patches are handled in the background, with no manual setup or restarts required.
  • Built-in capabilities: Includes task scheduling, persistent storage, and dynamic skill loading based on your prompts, with seamless access across devices.

Troubleshooting common OpenClaw installation errors

Most OpenClaw installation issues fall into a few common categories, such as PATH configuration, missing dependencies, or port conflicts. The sections below help you quickly identify and fix the most frequent problems across macOS, Windows, and Linux.

"openclaw: command not found" after installation

OpenClaw is not in your system PATH.

  • Fix: Add the npm global bin directory to your PATH.
export PATH="$PATH:$(npm config get prefix)/bin"

Then reload your shell (e.g., source ~/.zshrc) or restart your terminal. On Windows, add the path to your environment variables and restart PowerShell.

Sharp build errors on macOS

This usually happens when a globally installed libvips conflicts with the Sharp library.

  • Fix: Run the install command with this environment variable.
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest

If you see node-gyp errors, install Xcode Command Line Tools:

xcode-select --install

OpenClaw does not start after reboot

The background daemon was not installed during onboarding.

  • Fix: Run onboarding again with the daemon flag.
openclaw onboard --install-daemon

Then verify the service:

# macOS launchctl list | grep openclaw # Linux systemctl status openclaw

Gateway not responding or showing "0 tokens used"

The gateway process may have stopped, or API authentication may have failed.

  • Fix: Restart the gateway.
openclaw gateway restart

Run a health check:

openclaw doctor

For debugging logs:

openclaw logs --follow

Also, verify your API key is valid.

Port 18789 already in use

Another process is using the OpenClaw gateway port.

  • Fix: Find and stop the conflicting process
# macOS / Linux sudo lsof -i :18789 kill -9 <PID> # Windows (PowerShell) netstat -ano | findstr :18789

Then restart the gateway:

openclaw gateway restart

EACCES permission errors

This usually means the npm global directory does not have the correct permissions.

  • Fix: Update directory ownership.
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

On Windows, run PowerShell as Administrator or set a custom npm prefix:

npm config set prefix "$env:APPDATA\npm"

For Docker setups, fix volume permissions:

sudo chown -R 1000:1000 ~/.openclaw

"spawn git ENOENT" error

Git is not installed or not available in the PATH.

  • Fix: Install Git from git-scm.com, restart your terminal, and retry the installation.

WSL2 systemd not working

Systemd is not enabled in your WSL configuration.

  • Fix: Edit /etc/wsl.conf and add.
[boot] systemd=true

Then restart WSL:

wsl --shutdown

Reopen your Linux terminal and verify:

systemctl status openclaw

Out-of-memory during npm install on VPS

Low-memory VPS instances may fail during package installation.

  • Fix: Create a swap file.
sudo fallocate -l 4G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile

Then rerun the installation.

"Access not configured" when connecting to messaging platforms

Your account is not authorized by OpenClaw.

  • Fix: Approve your account using the pairing code.
openclaw pairing approve telegram <CODE>

Also, verify your bot credentials (token, webhook, permissions) are configured correctly.

Conclusion

Installing OpenClaw is straightforward across macOS, Linux, and Windows. You can use a one-line script, PowerShell, WSL2, or npm, depending on your setup. The onboarding wizard guides you through model selection, API configuration, and messaging channels. If you prefer not to manage a local environment, Kimi Claw offers a fully hosted option that lets you run OpenClaw directly in the cloud.

Questions & Answers

Can I install OpenClaw on Windows without WSL?
Yes. The PowerShell installer (iwr -useb https://openclaw.ai/install.ps1 | iex) runs natively on Windows 10 and Windows 11. It handles Node.js detection, CLI installation, and onboarding without requiring WSL. WSL2 is recommended for long-running setups, as systemd provides more reliable background services. For general use, the native PowerShell installation works well.
What Node.js version does OpenClaw need?
Node 24 is recommended, while Node 22 LTS (22.14 or later) is also supported. The one-line installer automatically checks your Node.js version and upgrades it if needed. If you install OpenClaw manually with npm, run node --version to confirm your version meets the minimum requirement.
How do I update OpenClaw after installation?
Run npm install -g openclaw@latest from your terminal. This updates the CLI to the latest version. You can also rerun the one-line installer, which automatically upgrades your existing installation. OpenClaw also supports in-app updates through the Control UI at 127.0.0.1:18789. After updating, restart the gateway with the openclaw gateway restart to load the new version.
Is OpenClaw free to install?
Yes. OpenClaw is free and open source under the MIT license. You will need an API key from a model provider to run the agent, which may incur usage costs.
How do I keep OpenClaw running after closing the terminal?
The installer registers OpenClaw as a background service. On macOS, it creates a LaunchAgent. On Linux, it uses a systemd service. Run the openclaw gateway status to confirm the daemon is active. On Windows, WSL2 with systemd enabled provides the most reliable always-on setup. If you prefer not to manage local services, fully hosted options like Kimi Claw allow you to run OpenClaw continuously in the cloud.