|
| 1 | +--- |
| 2 | +title: Complete Guide to OpenClaw Installation and Configuration |
| 3 | +description: A comprehensive guide on how to install and configure OpenClaw, the open-source personal AI assistant. |
| 4 | +slug: openclaw-install |
| 5 | +date: 2026-03-23 22:00:00+0800 |
| 6 | +categories: |
| 7 | + - Tutorials |
| 8 | +tags: |
| 9 | + - OpenClaw |
| 10 | +--- |
| 11 | + |
| 12 | +# Complete Guide to OpenClaw Installation and Configuration |
| 13 | + |
| 14 | +OpenClaw is a personal AI assistant platform designed to run on your own devices. It integrates seamlessly with your favorite chat channels (such as WhatsApp, Telegram, Slack, Discord, etc.), providing a unified and "always-on" AI experience. This guide will walk you through the complete installation and configuration process. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +Before installing OpenClaw, please ensure your system meets the following requirements: |
| 19 | + |
| 20 | +- **Node.js**: Node 24 is highly recommended. Node 22.16+ is also supported. |
| 21 | +- **Operating System**: macOS, Linux, or Windows (WSL2 is strongly recommended for stability). |
| 22 | +- **Model API Keys**: You need API keys from providers like Anthropic, OpenAI, or Google. |
| 23 | +- **Network**: A stable internet connection for downloading packages and communicating with AI models. |
| 24 | + |
| 25 | +## Installation Methods |
| 26 | + |
| 27 | +OpenClaw offers multiple installation methods. Choose the one that best fits your technical preference. |
| 28 | + |
| 29 | +### 1. Recommended: Installation Script (Fastest) |
| 30 | + |
| 31 | +The installation script automatically detects your OS, installs Node if necessary, and guides you through the initialization. |
| 32 | + |
| 33 | +#### macOS / Linux / WSL2 |
| 34 | +**openclaw** |
| 35 | +```bash |
| 36 | +curl -fsSL https://openclaw.ai/install.sh | bash |
| 37 | +``` |
| 38 | +**openclaw-cn** |
| 39 | +```bash |
| 40 | +curl -fsSL https://open-claw.org.cn/install-cn.sh | bash |
| 41 | +``` |
| 42 | + |
| 43 | +#### Windows (PowerShell) |
| 44 | +**openclaw** |
| 45 | +```powershell |
| 46 | +iwr -useb https://openclaw.ai/install.ps1 | iex |
| 47 | +``` |
| 48 | +**openclaw-cn (Ensure Git is installed):** |
| 49 | +```powershell |
| 50 | +iwr -useb https://open-claw.org.cn/install-cn.ps1 | iex |
| 51 | +``` |
| 52 | + |
| 53 | +### 2. Manual Installation via npm or pnpm |
| 54 | + |
| 55 | +If you prefer managing your Node environment manually, you can install the OpenClaw CLI globally. |
| 56 | + |
| 57 | +#### Using npm |
| 58 | +```bash |
| 59 | +npm install -g openclaw@latest |
| 60 | +openclaw onboard --install-daemon |
| 61 | +``` |
| 62 | + |
| 63 | +#### Using pnpm |
| 64 | +```bash |
| 65 | +pnpm add -g openclaw@latest |
| 66 | +pnpm approve-builds -g |
| 67 | +openclaw onboard --install-daemon |
| 68 | +``` |
| 69 | + |
| 70 | +### 3. Source Installation (For Developers) |
| 71 | + |
| 72 | +If you want to contribute or run from the local codebase: |
| 73 | + |
| 74 | +**openclaw** |
| 75 | +```bash |
| 76 | +git clone https://github.com/openclaw/openclaw.git |
| 77 | +cd openclaw |
| 78 | +pnpm install && pnpm ui:build && pnpm build |
| 79 | +pnpm link --global |
| 80 | +openclaw onboard --install-daemon |
| 81 | +``` |
| 82 | + |
| 83 | +**openclaw-cn (using Gitee and npmmirror):** |
| 84 | +```bash |
| 85 | +git clone https://gitee.com/OpenClaw-CN/openclaw-cn.git |
| 86 | +cd openclaw-cn |
| 87 | +pnpm config set registry https://registry.npmmirror.com/ # Set registry mirror |
| 88 | +pnpm install && pnpm ui:build && pnpm build |
| 89 | +pnpm link --global |
| 90 | +openclaw onboard --install-daemon |
| 91 | +``` |
| 92 | + |
| 93 | +## Initialization and Configuration (Onboarding) |
| 94 | + |
| 95 | +After installation, the most important step is running the onboarding wizard. It will configure your workspace, gateway, and initial AI models. |
| 96 | + |
| 97 | +```bash |
| 98 | +openclaw onboard --install-daemon |
| 99 | +``` |
| 100 | + |
| 101 | +The wizard will prompt you to: |
| 102 | +1. **Select Model Provider**: Choose between Anthropic, OpenAI, Google, etc. |
| 103 | +2. **Enter API Key**: Provide the API key for your chosen provider. |
| 104 | +3. **Install Daemon**: Install OpenClaw as a system service (recommended) to keep it running in the background. |
| 105 | + |
| 106 | +## Verifying Installation |
| 107 | + |
| 108 | +To ensure everything is running correctly, use the following commands: |
| 109 | + |
| 110 | +```bash |
| 111 | +openclaw doctor # Check for configuration issues |
| 112 | +openclaw status # Check Gateway status |
| 113 | +openclaw dashboard # Open the browser UI |
| 114 | +``` |
0 commit comments