1. 安装 Node.js

前往 Node.js 官网 或 点击这里 (Node.js v24.14.1-x64) 获取 “Windows 安装程序 (.msi)”

在这里插入图片描述

下载完成后进行安装,安装过程无脑下一步即可

2. 安装 Git

前往 Git 官网 或 点击这里 (Git v2.53-x64) 获取安装包

[!NOTE]

注:将从 GitHub 下载,可能需要科学上网

在这里插入图片描述

下载完成后进行安装,安装过程无脑下一步即可

3. 安装 OpenClaw

3.1 修改 Powershell 的脚本执行策略

以管理员身份打开 Powershell

在命令行输入以下命令:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

输入遇到以下提示,输入 Y 同意本次修改

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"):

3.2 使用官方脚本安装 OpenClaw

[!NOTE]

开始前,请先关闭电脑上的所有安全软件,避免安装过程遇到拦截

在 PowerShell 命令行执行以下命令,以使用官方脚本安装 OpenClaw(安装时间较长,请耐心等待)

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

当你看见以下提示,表示 OpenClaw 安装完成

All done! I promise to only judge your code a little bit.

Starting setup...


🦞 OpenClaw  2026.3.28 (f9b1079) — I'm the middleware between your ambition and your attention span.

3.3 配置 OpenClaw

在 OpenClaw 安装完成后,会弹出初始化界面,以下为配置流程,非必要内容已删除

# 1. 确认免责声明
I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
> Yes /   No # 使用键盘的 左方向键 选中 Yes

# 2. 安装模式,选择 QuickStart
Setup mode
> QuickStart (Configure details later via openclaw configure.)
  Manual

# 3. 选择 AI 大模型,根据自己的喜好使用 上下方向键 选择即可,本教程以 DeepSeek 为例
Model/auth provider
  Anthropic
  BytePlus
  Chutes
  Cloudflare AI Gateway
  Copilot
  Custom Provider
> DeepSeek (API key)
  Google
  Hugging Face
  Kilo Gateway
  LiteLLM
...
  Skip for now

# 4. 输入密钥
# - 若不知道如何获取 API Key,请参阅本文末尾的 "a. 获取 API Key"
Enter DeepSeek API key
XXXXXXXXXXXXXXX

# 5. 选择模型,根据具体需求选择,这里保持默认
Default model
 > Keep current (deepseek/deepseek-chat)
   Enter model manually
   deepseek/deepseek-chat
   deepseek/deepseek-reasoner

# 6. 设置通信渠道,根据具体需求选择,这里先跳过
*  Select channel (QuickStart)
   Telegram (Bot API)
   WhatsApp (QR link)
   Discord (Bot API)
   IRC (Server + Nick)
   Google Chat (Chat API)
...
 > Skip for now (You can add channels later via `openclaw channels add`)

# 7. 设置联网搜索。根据具体需求选择,这里先跳过
*  Search provider
   Brave Search
   DuckDuckGo Search (experimental)
   Exa Search
   Firecrawl Search
   Gemini (Google Search)
   Grok (xAI)
   Kimi (Moonshot)
   Perplexity Search
   Tavily Search
 > Skip for now (Configure later with openclaw configure --section web)

# 8. 设置技能,根据具体需求选择,这里先跳过
Install missing skill dependencies
  [•] Skip for now (Continue without installing dependencies)
  [ ] 🔐 1password
  [ ] 📰 blogwatcher
  [ ] 🫐 blucli
  [ ] 📸 camsnap
  [ ] 🧩 clawhub
  [ ] 🛌 eightctl
  ...

# 9. 设置一系列服务,根据具体需求选择,这里全部选择 NO
o  Set GOOGLE_PLACES_API_KEY for goplaces?
|  No
|
o  Set NOTION_API_KEY for notion?
|  No
|
o  Set OPENAI_API_KEY for openai-whisper-api?
|  No
|
o  Set ELEVENLABS_API_KEY for sag?
|  No

# 10. 设置是否启用 Hook,根据具体需求选择,这里先跳过
Enable hooks?
  [•] Skip for now

# -!- 完成上述步骤后,OpenClaw 会打开一个新的窗口,请勿将其关闭

# 11. 设置 OpenClaw 启动方式。根据喜好选择,这里选择使用 Web UI

 How do you want to hatch your bot?
   Hatch in TUI (recommended)
 > Open the Web UI
   Do this later

# - 完成后 OpenClaw 会启动一个 Web 页面,如果配置顺利且 API Key 可用,即可与 OpenClaw 开始聊天

在这里插入图片描述

4. OpenClaw 对接飞书

4.1 创建飞书机器人

前往 飞书开放平台,点击 “开发者后台”,“创建企业自建应用”,填写信息并创建

在这里插入图片描述

在侧边栏选择 “添加应用能力”,点击添加 “机器人”

在这里插入图片描述

在侧边栏选择 “权限管理”,点击 “开通权限”,在搜索栏搜索 im:,勾选所有权限,点击 “确认开通权限”

在这里插入图片描述

点击上方的 “创建版本”,填写基本信息,保存并确认发布

在这里插入图片描述

4.2 配置 Openclaw 连接飞书

回到 powershell 命令行,进行以下操作:

# 1. 输入 openclaw config 打开设置页面
PS C:\Windows\system32> openclaw config

# 2. 设置网关运行于本机
Where will the Gateway run?
  > Local (this machine) (Gateway reachable (ws://127.0.0.1:18789))
    Remote (info-only)

# 3. 选择配置 Channels
Select sections to configure
   Workspace
   Model
   Web tools
   Gateway
   Daemon
 > Channels (Link WhatsApp/Telegram/etc and defaults)
   Skills
   Health check
   Continue

# 4. 选择添加新的消息渠道
Channels
  > Configure/link (Add/update channels; disable unselected accounts)
    Remove channel config

# 5. 选择飞书
Select a channel
   Telegram (Bot API)
   ...
   Nextcloud Talk (self-hosted)
 > Feishu/Lark (飞书) (needs app creds)
   BlueBubbles (macOS app)
   ...

# 6. 选择使用 App Secret
How do you want to provide this App Secret?
 > Enter App Secret (Stores the credential directly in OpenClaw config)
   Use external secret provider

# 7. 输入 App Secret(可以在飞书的 "凭证与基础信息" 处找到)
Enter Feishu App Secret
  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

# 8. 输入 App ID(可以在飞书的 "凭证与基础信息" 处找到)
Enter Feishu App ID
  XXXXXXXXXXXX

# 9. 选择通信方式,保持默认
Feishu connection mode
 > WebSocket (default)
   Webhook
Which Feishu domain?
 > Feishu (feishu.cn) - China 
   Lark (larksuite.com) - Internetional

# 10. 设置聊天策略,选择 Open,即所有群聊均可用
Group chat policy
   Allowlist - only respond in specific groups
 > Open - respond in all groups (requires mention)
   Disabled - dont respond in groups

# 11. 退出配置
elect a channel
   ... 
 > Finished (Done)

# 12. 配置私聊访问策略
Configure DM access policies now? (default: pairing)
 > Yes /   No

# - 若是测试环境,可以选择 Open,正式环境建议选择 Pairing
Feishu DM policy
   Pairing (recommended)
   Allowlist (specific users only)
 > Open (public inbound DMs)
   Disabled (ignore DMs)

# 13. 退出配置
Select sections to configure
   ...
 > Continue (Done)

# 14. 启用网关
PS C:\Windows\system32> openclaw gateway

回到飞书,点击侧边栏的 “事件与回调”,编辑订阅方式为长连接,点击保存

在这里插入图片描述

点击右侧的 “添加事件”,搜索 “接收”,勾选 “接收消息”,点击添加

在这里插入图片描述

点击侧边栏的 “授权管理”,点击 “开通权限”,搜索 “通讯录”,勾选 “获取通讯录基本信息”,点击 “确认开通权限”,点击 “确认”

在这里插入图片描述

按照之前的操作创建并发布一个新的版本

4.3 在飞书 APP 上与 OpenClaw 对话

在手机上下载 “飞书”,登录完成后,点击 “开发者小助手”,点击最下方的 “打开应用”,即可开始与 OpenClaw 对话

当发送的消息下方有个表情时,表示 OpenClaw 正在输入

在这里插入图片描述

在这里插入图片描述

至此,OpenClaw 基本安装已完成

a. 获取 API Key

[!NOTE]

不同大模型获取密钥方式不同,本片以 DeepSeek 为例

点击这里 访问 DeepSeek 官网

点击 “API 开放平台”

在这里插入图片描述

点击 “API Keys”,“创建 API Key”

在这里插入图片描述

输入名称,点击创建,即可创建你的 API Key

[!CAUTION]

请勿将您的 API Key 随意透露给他人或发布到公共平台

Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐