这篇文章从 零开始,手把手教你在 Debian / Ubuntu 系 Linux 上安装 OpenClaw,并接入 MiniMax 大模型 API,最终实现一个可用的 AI Agent / AI 助手环境。
推荐系统:
先更新系统:
sudo apt update
sudo apt upgrade -y
安装基础工具:
sudo apt install -y curl git nodejs npm
检查 Node 版本:
node -v
建议:
Node >= 18
官方提供了一键安装脚本。
执行:
curl -fsSL https://openclaw.ai/install.sh | bash
安装过程通常为:
root@server-1:~# curl -fsSL https://openclaw.ai/install.sh | bash
🦞 OpenClaw Installer
Gateway online—please keep hands, feet, and appendages inside the shell at all times.
✓ Detected: linux
Install plan
OS: linux
Install method: npm
Requested version: latest
[1/3] Preparing environment
· Node.js v20.20.1 found, upgrading to v22+
· Installing Node.js via NodeSource
· Installing Linux build tools (make/g++/cmake/python3)
✓ Build tools installed
✓ Node.js v22 installed
· Active Node.js: v22.22.1 (/usr/bin/node)
· Active npm: 10.9.4 (/usr/bin/npm)
[2/3] Installing OpenClaw
✓ Git already installed
· Installing OpenClaw v2026.3.11
✓ OpenClaw npm package installed
✓ OpenClaw installed
[3/3] Finalizing setup
🦞 OpenClaw installed successfully (OpenClaw 2026.3.11 (29dc654))!
cracks claws Alright, what are we building?
· Starting setup
到这里可以先推出,当然如果其他配置信息都准备好了也可以直接进入配置环节:
◇ I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
│ No
OpenClaw 需要接入模型 API。
这里使用 MiniMax 模型。
打开 MiniMax 控制台:
https://platform.minimaxi.com/login
注册账号。
登录后进入:
API Keys
创建一个新的 Key。得到类似:
sk-xxxxxxxxxxxxxxxxxxxx
保存这个 Key,后面要用。
进入 OpenClaw 配置:
openclaw configure
示例:
root@server-1:~# openclaw configure
🦞 OpenClaw 2026.3.11 (29dc654) — It's not "failing," it's "discovering new ways to configure the same thing wrong."
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🦞 OPENCLAW 🦞
┌ OpenClaw configure
│
◇ Where will the Gateway run?
│ Local (this machine)
│
◇ Select sections to configure
│ Model
│
◇ Model/auth provider
│ MiniMax
│
◇ MiniMax auth method
│ MiniMax M2.5
│
◇ How do you want to provide this API key?
│ Paste API key now
│
◇ Enter MiniMax API key
│ sk-api-SvjQU6Ilx2PMjJUZkF1qI8LBlCcfvbmr8kX1GUDjLnD3hfJzbppxGq8z94pYKE73hoUWZPKhfjvl07mfkCdoSHyDrAxFX8RCoDuEVvM3iVJSW8e6U4Pse8A
│
◇ Models in /model picker (multi-select)
│ 1 items selected
Updated ~/.openclaw/openclaw.json
│
◇ Select sections to configure
│ Continue
│
◇ Control UI ─────────────────────────────────────────────────────────────────╮
│ │
│ Web UI: http://127.0.0.1:18789/ │
│ Gateway WS: ws://127.0.0.1:18789 │
│ Gateway: not detected (gateway url override requires explicit credentials) │
│ Docs: https://docs.openclaw.ai/web/control-ui │
│ │
├──────────────────────────────────────────────────────────────────────────────╯
│
└ Configure complete.
配置好模型直接选 Continue 推出配置。
申请 QQ 机器人,获得机器人 BOT_TOKEN
1. 官方入口: 访问 q.qq.com/qqbot/openclaw/login.html,使用手机 QQ 扫码。
2. 创建机器人: 在开放平台点击“创建机器人”,系统将自动生成 AppID 与 AppSecret。
安装 QQ 机器人官方插件
终端执行命令:
openclaw plugins install @tencent-connect/openclaw-qqbot@latest
绑定渠道(替换为你获得的 token)
终端执行命令:
openclaw channels add --channel qqbot --token "YOUR_BOT_TOKEN"
root@server-1:~# openclaw gateway install
🦞 OpenClaw 2026.3.11 (29dc654) — Your config is valid, your assumptions are not.
Config overwrite: /root/.openclaw/openclaw.json (sha256 568cacd3a520ce5fe600d2373949aec46036aa81bcfa6a180a84e44dc842e0bd -> e4d9fb219f795e8f3cc0c16535a3fbf0a77028ce8578fbeb73e4eec2e4eecf31, backup=/root/.openclaw/openclaw.json.bak)
No gateway token found. Auto-generated one and saving to config.
Installed systemd service: /root/.config/systemd/user/openclaw-gateway.service
root@server-1:~# systemctl --user start openclaw-gateway.service
root@server-1:~# systemctl --user status openclaw-gateway.service
● openclaw-gateway.service - OpenClaw Gateway (v2026.3.11)
Loaded: loaded (/root/.config/systemd/user/openclaw-gateway.service; enabled; preset: enabled)
Active: active (running) since Fri 2026-03-13 02:37:16 UTC; 2min 0s ago
Main PID: 446906 (openclaw-gatewa)
Tasks: 11 (limit: 4682)
Memory: 237.4M
CPU: 10.235s
CGroup: /user.slice/user-0.slice/user@0.service/app.slice/openclaw-gateway.service
└─446906 openclaw-gateway
使用 QQ 问下机器人“你叫什么”,“报告下现状” 之类的,如果机器人能够正常回应说明安装完毕。