5 分钟内完成 OpenClaw 安装、配置和首次对话。

前置条件

  • Node.js 24(推荐),Node 22.16+ 也支持
  • 模型提供商 API Key(Anthropic/OpenAI/Google 等)

快速安装

# macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bash
 
# Windows (PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex

四步启动

# 1. 运行引导向导(约2分钟)
openclaw onboard --install-daemon
 
# 2. 验证 Gateway 运行(监听 18789 端口)
openclaw gateway status
 
# 3. 打开控制台
openclaw dashboard
 
# 4. 在控制台发送第一条消息

高级:自定义 Control UI

{
  "gateway": {
    "controlUi": {
      "enabled": true,
      "root": "$HOME/.openclaw/control-ui-custom"
    }
  }
}

环境变量

  • OPENCLAW_HOME — 内部路径解析的主目录
  • OPENCLAW_STATE_DIR — 覆盖状态目录
  • OPENCLAW_CONFIG_PATH — 覆盖配置文件路径

下一步

  • 连接 Channel(Discord/Telegram/WhatsApp 等)→ concepts/channel-routing
  • 配置 Gateway → gateway/configuration
  • 浏览工具 → concepts/tool-exec

相关

  • concepts/start-setup — 高级设置与开发工作流
  • concepts/start-onboarding-overview — 引导路径选择