Skip to content

Commit d1242e7

Browse files
committed
docs: 添加 OpenClaw 安装与配置指南文档
新增 OpenClaw 项目的中英文安装指南文档,详细介绍通过安装脚本、npm/pnpm 安装以及源码安装等多种安装方式,并包含初始化配置和验证步骤。
1 parent bc94c77 commit d1242e7

2 files changed

Lines changed: 227 additions & 0 deletions

File tree

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
```
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: OpenClaw 安装与配置完全指南
3+
description: 全面介绍如何安装和配置 OpenClaw,这款开源的个人 AI 助手。
4+
slug: openclaw-install
5+
date: 2026-03-23 22:00:00+0800
6+
categories:
7+
- Tutorials
8+
tags:
9+
- OpenClaw
10+
---
11+
12+
# OpenClaw 安装与配置完全指南
13+
14+
OpenClaw 是一款旨在运行在用户自有设备上的个人 AI 助手平台。它能与你常用的聊天频道(如 WhatsApp、Telegram、Slack、Discord 等)无缝集成,提供统一且“永不离线”的 AI 体验。本指南将带你完成完整的安装和配置过程。
15+
16+
## 前置条件
17+
18+
在安装 OpenClaw 之前,请确保你的系统满足以下要求:
19+
20+
- **Node.js**: 强烈推荐 Node 24 版本。Node 22.16+ 版本也可支持。
21+
- **操作系统**: macOS、Linux 或 Windows(为了稳定性,强烈推荐使用 WSL2)。
22+
- **模型 API 密钥**: 你需要准备好来自 Anthropic、OpenAI 或 Google 等提供商的 API 密钥。
23+
- **网络**: 稳定的互联网连接,用于下载软件包以及与 AI 模型通信。
24+
25+
## 安装方法
26+
27+
OpenClaw 提供了多种安装方式,你可以根据自己的技术偏好进行选择。
28+
29+
### 1. 推荐方式:安装脚本(最快)
30+
31+
安装脚本会自动检测你的操作系统,根据需要安装 Node,并引导你完成初始化过程。
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**(安装脚本不会在Windows原生环境自动下载Git,请确保已安装Git)
49+
```powershell
50+
iwr -useb https://open-claw.org.cn/install-cn.ps1 | iex
51+
52+
```
53+
54+
### 2. 通过 npm 或 pnpm 手动安装
55+
56+
如果你更喜欢自己管理 Node 环境,可以全局安装 OpenClaw CLI。
57+
58+
#### 使用 npm
59+
```bash
60+
npm install -g openclaw@latest
61+
openclaw onboard --install-daemon
62+
```
63+
64+
#### 使用 pnpm
65+
```bash
66+
pnpm add -g openclaw@latest
67+
pnpm approve-builds -g
68+
openclaw onboard --install-daemon
69+
```
70+
71+
### 3. 源码安装(针对开发者)
72+
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+
**openclaw-cn**
83+
```bash
84+
git clone https://gitee.com/OpenClaw-CN/openclaw-cn.git
85+
cd openclaw-cn
86+
pnpm config set registry https://registry.npmmirror.com/ # 配置国内镜像
87+
pnpm install && pnpm ui:build && pnpm build
88+
pnpm link --global
89+
openclaw onboard --install-daemon
90+
```
91+
92+
## 初始化与配置 (Onboarding)
93+
94+
安装完成后,最重要的步骤是运行初始化向导。它将配置你的工作区、网关以及初始 AI 模型。
95+
96+
```bash
97+
openclaw onboard --install-daemon
98+
```
99+
100+
向导会提示你:
101+
1. **选择模型提供商**: 在 Anthropic、OpenAI、Google 等之间进行选择。
102+
2. **输入 API 密钥**: 输入对应提供商的 API 密钥。
103+
3. **安装守护进程 (Daemon)**: 将 OpenClaw 安装为系统服务(推荐),使其在后台持续运行。
104+
105+
## 验证安装
106+
107+
要确保一切正常运行,请使用以下命令:
108+
109+
```bash
110+
openclaw doctor # 检查配置问题
111+
openclaw status # Gateway 网关状态
112+
openclaw dashboard # 打开浏览器 UI
113+
```

0 commit comments

Comments
 (0)