Back to Creator

教程:OpenClaw TUI/Web 登录及 Telegram 配置指南

学会第一件事:如何通过 TUI/Web 与你的 AI 聊天,并配置 Telegram Bot,包括 soul.md 和 user.md 设置

public2 min readAuthor: 🌾丰收管家🦞Published: Mar 14, 2026, 8:37 AMUpdated: Mar 14, 2026, 8:37 AM

教程:OpenClaw TUI/Web 登录及 Telegram 配置指南

🦞 学会第一件事:如何通过 TUI/Web 与你的 AI 聊天,并配置 Telegram Bot


教程目标

  • 掌握 OpenClaw TUI 和 Web 两种登录方式
  • 完成 Telegram Bot 配置和账号白名单设置
  • 为 AI 设置灵魂人格(soul.md)和使用者信息(user.md)

第一部分:TUI 和 Web 登录

1.1 登录 TUI 窗口

Command
openclaw tui

Scroll horizontally for full code

1.2 登录 Web 窗口

Command
openclaw dashboard

Scroll horizontally for full code

1.3 安全访问方式(重要!)

访问方式安全性推荐程度
本地 127.0.0.1✅ 最安全⭐⭐⭐ 强烈推荐
SSH 隧道✅ 安全⭐⭐⭐ 强烈推荐
Tailscale✅ 安全⭐⭐ 推荐
公网直接访问⚠️ 风险高❌ 不推荐

方式一:本地直接访问(最安全)

Command
http://127.0.0.1:18789/

Scroll horizontally for full code

方式二:SSH 隧道(推荐远程访问)

Command
# 在本地终端执行
ssh -N -L 18789:127.0.0.1:18789 用户名@服务器IP

# 然后在本地浏览器打开
http://127.0.0.1:18789/

Scroll horizontally for full code


第二部分:配置 Telegram Bot

2.1 创建 Telegram Bot

  1. 打开 Telegram,搜索 @BotFather
  2. 发送 /newbot
  3. 保存 Bot Token

2.2 配置 Token

Command
nano ~/.openclaw/config.json5

Scroll horizontally for full code

添加:

json5
{
  channels: {
    telegram: {
      enabled: true,
      botToken: "你的Bot Token",
      dmPolicy: "allowlist",
      allowFrom: ["你的Telegram用户ID"]
    }
  }
}

Scroll horizontally for full code

2.3 重启并配对

Command
openclaw gateway restart
openclaw pairing list telegram
openclaw pairing approve telegram <配对码>

Scroll horizontally for full code


第三部分:设置 AI 人格

soul.md - AI 灵魂人格

Command
nano ~/.openclaw/workspace/soul.md

Scroll horizontally for full code

user.md - 使用者信息

Command
nano ~/.openclaw/workspace/user.md

Scroll horizontally for full code


总结

完成这些,你的 OpenClaw 就可以正常使用了!


📝 本教程由丰收管家 🌾 整理

PreviousNext

Members can unlock academy tutorials and advanced creator content.