Home Tutorials Categories Skills About
ZH EN JA KO
Installation

How to Install OpenClaw

· 10 min read

What Is OpenClaw

OpenClaw is an open-source, self-hostable personal AI assistant platform. It connects your favorite messaging apps — WhatsApp, Telegram, Discord, Slack, iMessage, and more — to a variety of AI models, letting you chat with AI directly from any familiar interface. The project has earned over 100,000 stars on GitHub and has a thriving community.

If you've been wanting your own AI assistant without being locked into any particular platform, OpenClaw is one of the best options available today. This guide will walk you through every step from a fresh start to a working installation.

System Requirements

Before you begin, make sure your environment meets the following requirements:

  • Node.js 22 or later: OpenClaw relies on newer Node.js features, and version 22 is the minimum.
  • Operating system: macOS, Linux, or Windows (macOS or Linux recommended).
  • Internet connection: The installation process needs to download packages from the npm registry.

Check your current Node.js version:

node -v

If your version is below 22, use nvm to upgrade:

nvm install 22
nvm use 22

If you don't have nvm installed yet, follow the instructions at the official nvm repository. Windows users can use nvm-windows.

Install OpenClaw via npm

Once your Node.js environment is ready, install OpenClaw globally with npm:

npm install -g openclaw@latest

After installation, verify that it was successful:

openclaw --version

If you see the version number printed correctly, the installation is complete.

macOS users can also install via Homebrew:

brew install openclaw

Run the Setup Wizard

OpenClaw ships with an interactive onboarding wizard that walks you through the initial configuration. Start it with:

openclaw onboard

The wizard will guide you through the following steps:

  1. Choose an AI model provider: You can pick from Anthropic Claude, OpenAI, Ollama (local models), Gemini, OpenRouter, and others. If you don't have an API key yet, you can start with Ollama to run models locally.
  2. Enter your API key: Provide the API key for your chosen provider.
  3. Select messaging channels: Choose which chat platforms to connect, such as WhatsApp or Telegram. For a first-time install, feel free to skip this step and configure channels later.
  4. Confirm your settings: The wizard displays a configuration summary for you to review before writing it to disk.

All settings are saved in ~/.config/openclaw/openclaw.json5. You can always edit this file manually to tweak your configuration.

Start the Gateway Service

With the configuration in place, start the OpenClaw Gateway service:

openclaw up

The Gateway runs on port 18789 by default. You can visit http://localhost:18789 in your browser to check the service status.

To run the service in the background:

openclaw up -d

Open the Dashboard for Testing

OpenClaw includes a built-in web Dashboard where you can chat with the AI directly in your browser — handy for verifying that everything is set up correctly:

openclaw dashboard

This will automatically open the Dashboard in your browser. Type a message in the chat box — something like "Hello, tell me about yourself" — and if you get a reply from the AI, the entire pipeline is working.

Troubleshooting Common Issues

If you run into problems, OpenClaw provides a diagnostic tool:

openclaw doctor

This command checks your environment, dependency versions, API connectivity, and more, then offers suggestions for fixes.

Common issues and solutions:

  • command not found: openclaw: Make sure the npm global bin directory is in your PATH. Run npm config get prefix to see the path, then add it to your PATH.
  • Node.js version too old: Upgrade with nvm install 22 && nvm use 22.
  • API connection failure: Verify that your API key is correct and that your network can reach the API endpoint. You can test manually with curl.
  • Port conflict: If port 18789 is already in use, change the gateway.port field in your configuration file.

Next Steps

Once the installation is complete, you can explore these features:

  • Connect more messaging platforms (WhatsApp, Telegram, Discord, etc.)
  • Configure multiple AI model providers and switch between them
  • Create custom Skills to extend your assistant's capabilities
  • Set up MCP Servers to integrate additional tools

For more information, visit OpenClaw or check the OpenClaw official documentation. Source code and issue tracking are available at the OpenClaw GitHub repository.

OpenClaw is a free, open-source personal AI assistant that supports WhatsApp, Telegram, Discord, and many more platforms