安装与配置
Installation & Setup
本指南将帮助你安装和配置DeepSeekV4与OpenClaw,让你能够在5分钟内运行第一个AI应用。
This guide will help you install and configure DeepSeekV4 and OpenClaw, enabling you to run your first AI application in 5 minutes.
前置要求
Prerequisites
- Node.js 22 或更高版本
- npm 或 yarn
- DeepSeekV4 API密钥
- 基本的命令行操作经验
- Node.js 22 or higher
- npm or yarn
- DeepSeekV4 API key
- Basic command line experience
提示: 如果你还没有Node.js,可以从 nodejs.org 下载安装。推荐使用LTS版本。
Tip: If you don't have Node.js yet, you can download and install it from nodejs.org. The LTS version is recommended.
步骤 1:获取DeepSeekV4 API密钥
Step 1: Get DeepSeekV4 API Key
- 访问 DeepSeekV4 平台
- 注册并登录账号
- 进入API密钥页面
- 创建新的API密钥并保存
- Visit the DeepSeekV4 platform
- Register and login to your account
- Go to the API Keys page
- Create a new API key and save it
重要: 请妥善保管你的API密钥,不要将其提交到公共代码仓库。
Important: Please keep your API key safe and do not commit it to public code repositories.
步骤 2:安装OpenClaw
Step 2: Install OpenClaw
OpenClaw可以通过npm全局安装:
OpenClaw can be installed globally via npm:
npm install -g openclaw
或者使用yarn:
Or using yarn:
yarn global add openclaw
安装完成后,验证安装:
After installation, verify:
openclaw --version
如果看到版本号输出,说明安装成功!
If you see the version number, installation is successful!
步骤 3:初始化配置
Step 3: Initialize Config
运行初始化命令:
Run the initialization command:
openclaw init
这个命令会创建默认配置文件 ~/.openclaw/openclaw.json。
This command creates the default config file ~/.openclaw/openclaw.json.
步骤 4:配置DeepSeekV4
Step 4: Configure DeepSeekV4
编辑配置文件,添加DeepSeekV4 API密钥:
Edit the config file and add your DeepSeekV4 API key:
{
"model": {
"provider": "deepseek",
"apiKey": "your-deepseekv4-api-key-here",
"model": "deepseekv4"
}
}
将 your-deepseekv4-api-key-here 替换为你在步骤1中获取的API密钥。
Replace your-deepseekv4-api-key-here with the API key you obtained in Step 1.
步骤 5:启动你的第一个AI应用
Step 5: Start Your First AI App
现在,启动OpenClaw Gateway:
Now, start the OpenClaw Gateway:
openclaw gateway start
默认情况下,OpenClaw会在 http://localhost:18789 启动控制面板。
By default, OpenClaw will start the control panel at http://localhost:18789.
打开浏览器,访问这个地址,你将看到OpenClaw的Dashboard。
Open your browser and visit this address to see the OpenClaw Dashboard.
下一步
Next Steps
恭喜!你已经成功安装和配置了DeepSeekV4和OpenClaw。接下来:
Congratulations! You have successfully installed and configured DeepSeekV4 and OpenClaw. Next:
- 学习DeepSeekV4 API基础
- 配置多渠道接入
- 开始构建第一个AI应用
- Learn DeepSeekV4 API Basics
- Configure Multi-Channel Integration
- Start Building Your First AI App