在 VPS Ubuntu24.04 服务器部署 Clawdbot
一、购买服务器
在 vultr.com 购买 VPS 服务器,Tokyo, 服务器配置 2c 2g 配置,Ubuntu 24.04 LTS x64, 15刀/月;
65 GB SSD
二、部署
购买好服务器后,按照官方教程进行安装:
Runtime: Node ≥22.
你这报错很明确了:Node 18 已经不行,至少要 20,最好直接上 22(LTS)。
在 Ubuntu 24.04 服务器 上,强烈推荐用 nvm 升级,安全、可回滚、不污染系统环境。
下面我给你 两种方案,你直接选 方案一(推荐) 就行。
✅ 安装系统级 Node 22(推荐方案)
Ubuntu 24.04 标准、稳定、生产可用:
apt remove -y nodejs npm
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
验证:
which node
node -v
安装 clawdbot
# 安装
npm install -g clawdbot@latest
# or: pnpm add -g clawdbot@latest
clawdbot onboard --install-daemon
执行命令:
oot@ailab:~/work# clawdbot onboard --install-daemon
🦞 Clawdbot 2026.1.24-3 (885167d) — If you can describe it, I can probably automate it—or at least make it funnier.
░████░█░░░░░█████░█░░░█░███░░████░░████░░▀█▀
█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░░█░█░░░█░░█░
█░░░░░█░░░░░█████░█░█░█░█░░█░████░░█░░░█░░█░
█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░█░░█░░░█░░█░
░████░█████░█░░░█░░█░█░░███░░████░░░███░░░█░
🦞 FRESH DAILY 🦞
┌ Clawdbot onboarding
│
◇ Security ───────────────────────────────────────────────────────────────────────────────╮
│ │
│ Please read: https://docs.clawd.bot/security │
│ │
│ Clawdbot agents can run commands, read/write files, and act through any tools you │
│ enable. They can only send messages on channels you configure (for example, an account │
│ you log in on this machine, or a bot account like Slack/Discord). │
│ │
│ If you’re new to this, start with the sandbox and least privilege. It helps limit what │
│ an agent can do if it’s tricked or makes a mistake. │
│ Learn more: https://docs.clawd.bot/sandboxing │
│ │
├──────────────────────────────────────────────────────────────────────────────────────────╯
│
◆ I understand this is powerful and inherently risky. Continue?
│ ○ Yes / ● No
└
│ Gateway port: 18789 │
│ Gateway bind: Loopback (127.0.0.1) │
│ Gateway auth: Token (default) │
│ Tailscale exposure: Off │
│ Direct to chat channels.

I understand this is powerful and inherently risky. Continue?
│ Yes
│
◇ Onboarding mode
│ QuickStart
│
◇ QuickStart ─────────────────────────╮
│ │
│ Gateway port: 18789 │
│ Gateway bind: Loopback (127.0.0.1) │
│ Gateway auth: Token (default) │
│ Tailscale exposure: Off │
│ Direct to chat channels. │
│ │
├──────────────────────────────────────╯
│
◆ Model/auth provider
│ ○ OpenAI
│ ● Anthropic (Claude Code CLI + API key)
│ ○ MiniMax
│ ○ Qwen
│ ○ Synthetic
│ ○ Venice AI
│ ○ Google
│ ○ Copilot
│ ○ OpenRouter
│ ○ Vercel AI Gateway
│ ○ Moonshot AI
│ ○ Z.AI (GLM 4.7)
│ ○ OpenCode Zen
│ ○ Skip for now
└
模型选择说明:
Clawdbot 使用技巧与小贴士
模型:优先选 Opus 4.5,它是最强的模型之一,很值得给你的 Clawd 开 Max 订阅。但如果价格太高,建议别直接用 API,你可以通过 Google Antigravity connector 免费用到 Opus 4.5。API Key 的一些不错替代方案是 MiniMax M2 和 GLM 4.7。
使用子代理,但要注意 token 消耗。你可以让 Clawdbot 拆分出多个子代理去做一堆任务,这样既能加速并行执行,也能让 Clawd 更快给出回复,同时降低它的上下文窗口压力。你甚至可以为不同的代理指定不同模型。对上下文很重的任务,可以用 Gemini Pro(100 万上下文)的代理,并只把摘要发回主代理。通过 API 使用时尤其要留意 token 消耗。
Clawdbot 不一定要买新的 Mac Mini(已经买了的就算了)按作者说法,Clawdbot 的 gateway(你可以理解为大脑)甚至能跑在一台 100 美元的 RaspberryPi 上。你可以用 Tailscale(免费且很容易配置)把很多节点安全地连起来,比如你的 Macbook。要是你确实买了新的 Mac mini,那你的 Clawdbot 就有自己的“小家”了。
别让它直接写代码:让它负责规划与监督。可以给 Clawd 一条指令,让它始终驱动另一个代理来写代码,比如 Claude Code 或 Codex。这样 Clawdbot 可以专注于监控与辅助,同时显著减少上下文窗口的压力。
 大写指令符号。教会你的 Clawdbot:当你用表情符号或文字指定一条“大写指令”时,它需要先把这条指令存入记忆,再去执行。这能让你的纠正指令在后续会话里更牢固地生效。
连接多个渠道。Telegram 最容易配置(在 TG 上给 @botfather 发个私信就能搞定),WhatsApp 也很好用。Clawdbot 能识别自己当前来自哪个渠道的对话。小建议:把 Clawdbot 拉进家庭群聊,会很有意思。
给它尽可能多的访问权限,以你觉得舒服为准。很多“aha”来自让 Clawdbot 访问关于你的更多信息与数据,比如文件、邮件、待办等。在你觉得舒适的范围内,让它有能力帮你处理日常生活。但对关键任务的邮箱和账号要更谨慎。用 1Password 的服务账号来提供密码,是个限制权限范围并提升安全性的好方式。
熟悉 Clawdbot CLI。尤其在早期安装和配置阶段,Clawdbot 的命令行界面是你用来设置、调试和更新配置的地方。稍微学一点就能在出问题时自己重启。
经常让 Clawdbot 永久学习内容。这也是大家最兴奋的点:Clawdbot 有很强的自我改进能力。你可以连续聊 3 小时,然后问它:“上面这些内容里,你应该永久记住什么,写成一个 skill。”它下次会话就能记住。这是使用 Clawdbot 最有价值的部分之一,也是大家很兴奋的原因。
给它接入 Grok API。Grok 4.1 是你能接入的最佳实时信息研究工具之一,因为它能用 web search 和 X search。注册他们的 API,然后告诉 Clawd:每次你想做研究时,都调用一个 Grok skill。这个方案便宜很多,也比默认建议的 Brave API 好不少。
使用QWen大模型
完整的输出:
Clawdbot 2026.1.24-3 (885167d) — If you can describe it, I can probably automate it—or at least make it funnier.
░████░█░░░░░█████░█░░░█░███░░████░░████░░▀█▀
█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░░█░█░░░█░░█░
█░░░░░█░░░░░█████░█░█░█░█░░█░████░░█░░░█░░█░
█░░░░░█░░░░░█░░░█░█░█░█░█░░█░█░░█░░█░░░█░░█░
░████░█████░█░░░█░░█░█░░███░░████░░░███░░░█░
🦞 FRESH DAILY 🦞
┌ Clawdbot onboarding
│
◇ Security ───────────────────────────────────────────────────────────────────────────────╮
│ │
│ Please read: https://docs.clawd.bot/security │
│ │
│ Clawdbot agents can run commands, read/write files, and act through any tools you │
│ enable. They can only send messages on channels you configure (for example, an account │
│ you log in on this machine, or a bot account like Slack/Discord). │
│ │
│ If you’re new to this, start with the sandbox and least privilege. It helps limit what │
│ an agent can do if it’s tricked or makes a mistake. │
│ Learn more: https://docs.clawd.bot/sandboxing │
│ │
├──────────────────────────────────────────────────────────────────────────────────────────╯
│
◇ I understand this is powerful and inherently risky. Continue?
│ Yes
│
◇ Onboarding mode
│ QuickStart
│
◇ QuickStart ─────────────────────────╮
│ │
│ Gateway port: 18789 │
│ Gateway bind: Loopback (127.0.0.1) │
│ Gateway auth: Token (default) │
│ Tailscale exposure: Off │
│ Direct to chat channels. │
│ │
├──────────────────────────────────────╯
│
◇ Model/auth provider
│ Anthropic
│
◇ Anthropic auth method
│ Back
│
◇ Model/auth provider
│ Qwen
│
◇ Qwen auth method
│ Qwen OAuth
sk-d885f05fc57b4ee1ac15a2a26b972cd0
^[[D^[
;
│
sk-d885f05fc57b4ee1ac15a2a26b972cd0
;
◒ Starting Qwen OAuth…│
◇ Qwen OAuth ─────────────────────────────────────────────────────────────────────────╮
│ │
│ Open https://chat.qwen.ai/authorize?user_code=02CPN35P&client=qwen-code to approve │
│ access. │
│ If prompted, enter the code 02CPN35P. │
│ │
├──────────────────────────────────────────────────────────────────────────────────────╯
◇ Qwen OAuth complete
│
◇ Model configured ─────────────────────────────╮
│ │
│ Default model set to qwen-portal/coder-model │
│ │
├────────────────────────────────────────────────╯
│
◇ Provider notes ──────────────────────────────────────────────────────────────────────╮
│ │
│ Qwen OAuth tokens auto-refresh. Re-run login if refresh fails or access is revoked. │
│ Base URL defaults to https://portal.qwen.ai/v1. Override │
│ models.providers.qwen-portal.baseUrl if needed. │
│ │
├───────────────────────────────────────────────────────────────────────────────────────╯
│
◇ Default model
│ Keep current (qwen-portal/coder-model)
│
◇ Channel status ────────────────────────────╮
│ │
│ Telegram: not configured │
│ WhatsApp: not configured │
│ Discord: not configured │
│ Google Chat: not configured │
│ Slack: not configured │
│ Signal: not configured │
│ iMessage: not configured │
│ Google Chat: install plugin to enable │
│ Nostr: install plugin to enable │
│ Microsoft Teams: install plugin to enable │
│ Mattermost: install plugin to enable │
│ Nextcloud Talk: install plugin to enable │
│ Matrix: install plugin to enable │
│ BlueBubbles: install plugin to enable │
│ LINE: install plugin to enable │
│ Zalo: install plugin to enable │
│ Zalo Personal: install plugin to enable │
│ Tlon: install plugin to enable │
│ │
├─────────────────────────────────────────────╯
│
◇ How channels work ─────────────────────────────────────────────────────────────────────╮
│ │
│ DM security: default is pairing; unknown DMs get a pairing code. │
│ Approve with: clawdbot pairing approve <channel> <code> │
│ Public DMs require dmPolicy="open" + allowFrom=["*"]. │
│ Multi-user DMs: set session.dmScope="per-channel-peer" to isolate sessions. │
│ Docs: start/pairing │
│ │
│ Telegram: simplest way to get started — register a bot with @BotFather and get going. │
│ WhatsApp: works with your own number; recommend a separate phone + eSIM. │
│ Discord: very well supported right now. │
│ Google Chat: Google Workspace Chat app with HTTP webhook. │
│ Slack: supported (Socket Mode). │
│ Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord."). │
│ iMessage: this is still a work in progress. │
│ Nostr: Decentralized protocol; encrypted DMs via NIP-04. │
│ Microsoft Teams: Bot Framework; enterprise support. │
│ Mattermost: self-hosted Slack-style chat; install the plugin to enable. │
│ Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots. │
│ Matrix: open protocol; install the plugin to enable. │
│ BlueBubbles: iMessage via the BlueBubbles mac app + REST API. │
│ LINE: LINE Messaging API bot for Japan/Taiwan/Thailand markets. │
│ Zalo: Vietnam-focused messaging platform with Bot API. │
│ Zalo Personal: Zalo personal account via QR code login. │
│ Tlon: decentralized messaging on Urbit; install the plugin to enable. │
│ │
├─────────────────────────────────────────────────────────────────────────────────────────╯
│
◇ Select channel (QuickStart)
│ Telegram (Bot API)
│
◇ Telegram bot token ────────────────────────────────────╮
│ │
│ 1) Open Telegram and chat with @BotFather │
│ 2) Run /newbot (or /mybots) │
│ 3) Copy the token (looks like 123456:ABC...) │
│ Tip: you can also set TELEGRAM_BOT_TOKEN in your env. │
│ Docs: https://docs.clawd.bot/telegram │
│ Website: https://clawd.bot │
│ │
├─────────────────────────────────────────────────────────╯
│
◇ Enter Telegram bot token
│ 8523989190:AAFFzoY9if_O9Eaa8FRZ8fmze85tK61jMp0
│
◇ Selected channels ──────────────────────────────────────────────────────────────────────╮
│ │
│ Telegram — simplest way to get started — register a bot with @BotFather and get going. │
│ https://docs.clawd.bot/channels/telegram │
│ 8;; │
│ https://clawd.bot │
│ │
├──────────────────────────────────────────────────────────────────────────────────────────╯
Updated ~/.clawdbot/clawdbot.json
Workspace OK: ~/clawd
Sessions OK: ~/.clawdbot/agents/main/sessions
│
◇ Skills status ────────────╮
│ │
│ Eligible: 7 │
│ Missing requirements: 42 │
│ Blocked by allowlist: 0 │
│ │
├────────────────────────────╯
│
◇ Configure skills now? (recommended)
│ Yes
│
◇ Homebrew recommended ──────────────────────────────────────────────────────────╮
│ │
│ Many skill dependencies are shipped via Homebrew. │
│ Without brew, you'll need to build from source or download releases manually. │
│ │
├─────────────────────────────────────────────────────────────────────────────────╯
│
◇ Show Homebrew install command?
│ Yes
│
◇ Homebrew install ─────────────────────────────────────────────────────╮
│ │
│ Run: │
│ /bin/bash -c "$(curl -fsSL │
│ https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" │
│ │
├────────────────────────────────────────────────────────────────────────╯
│
◇ Preferred node manager for skill installs
│ npm
│
▲ Install missing skill dependencies
▲ Install missing skill dependencies
▲ Install missing skill dependencies
◇ Install missing skill dependencies
│ 🐻 bear-notes, 🐦 bird, 📰 blogwatcher, 🫐 blucli, 🧩 clawdhub, 🎮 gog, 📦 mcporter, 📊 model-usage
│
◇ Installed bird
│
◇ Install failed: blogwatcher — go not installed (install via brew)
Tip: run `clawdbot doctor` to review skills + requirements.
Docs: https://docs.clawd.bot/skills
│
◇ Install failed: bear-notes — go not installed (install via brew)
Tip: run `clawdbot doctor` to review skills + requirements.
Docs: https://docs.clawd.bot/skills
│
◇ Install failed: blucli — go not installed (install via brew)
Tip: run `clawdbot doctor` to review skills + requirements.
Docs: https://docs.clawd.bot/skills
│
◇ Installed clawdhub
│
◇ Install failed: gog — brew not installed
Tip: run `clawdbot doctor` to review skills + requirements.
Docs: https://docs.clawd.bot/skills
│
◇ Installed mcporter
│
◇ Install failed: model-usage — missing brew formula
Tip: run `clawdbot doctor` to review skills + requirements.
Docs: https://docs.clawd.bot/skills
│
◇ Set GOOGLE_PLACES_API_KEY for goplaces?
│ Yes
│
◇ Enter GOOGLE_PLACES_API_KEY
│ AIzaSyDg1rjvyVvrYprjjRLqvCOcbMNdz0i9xKg
│
◇ Set GOOGLE_PLACES_API_KEY for local-places?
│ No
│
◇ Set GEMINI_API_KEY for nano-banana-pro?
│ No
│
◇ Set OPENAI_API_KEY for openai-image-gen?
│ No
│
◇ Set OPENAI_API_KEY for openai-whisper-api?
│ No
│
◇ Set ELEVENLABS_API_KEY for sag?
│ No
│
◇ Hooks ──────────────────────────────────────────────────────────╮
│ │
│ Hooks let you automate actions when agent commands are issued. │
│ Example: Save session context to memory when you issue /new. │
│ │
│ Learn more: https://docs.clawd.bot/hooks │
│ │
├──────────────────────────────────────────────────────────────────╯
│
◇ Enable hooks?
│ Skip for now, 🚀 boot-md, 📝 command-logger, 💾 session-memory
│
◇ Hooks Configured ─────────────────────────────────────────╮
│ │
│ Enabled 3 hooks: boot-md, command-logger, session-memory │
│ │
│ You can manage hooks later with: │
│ clawdbot hooks list │
│ clawdbot hooks enable <name> │
│ clawdbot hooks disable <name> │
│ │
├────────────────────────────────────────────────────────────╯
│
◇ Systemd ────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Linux installs use a systemd user service by default. Without lingering, systemd stops │
│ the user session on logout/idle and kills the Gateway. │
│ Enabling lingering now (may require sudo; writes /var/lib/systemd/linger). │
│ │
├──────────────────────────────────────────────────────────────────────────────────────────╯
│
◇ Systemd ─────────────────────────────╮
│ │
│ Enabled systemd lingering for root. │
│ │
├───────────────────────────────────────╯
│
◇ Gateway service runtime ────────────────────────────────────────────╮
│ │
│ QuickStart uses Node for the Gateway service (stable + supported). │
│ │
├──────────────────────────────────────────────────────────────────────╯
│
◒ Preparing Gateway service…│
◇ Gateway runtime ──────────────────────────────────────────────────────────────────╮
│ │
│ System Node unknown at /usr/bin/node is below the required Node 22+. Using │
│ /root/.nvm/versions/node/v22.22.0/bin/node for the daemon. Install Node 22+ from │
│ nodejs.org or Homebrew. │
│ │
├────────────────────────────────────────────────────────────────────────────────────╯
◑ Installing Gateway service…
Installed systemd service: /root/.config/systemd/user/clawdbot-gateway.service
◇ Gateway service installed
│
◇
Telegram: failed (unknown) - fetch failed
Agents: main (default)
Heartbeat interval: 30m (main)
Session store (main): /root/.clawdbot/agents/main/sessions/sessions.json (0 entries)
Missing Control UI assets. Build them with `pnpm ui:build` (auto-installs UI deps).
│
◇ Optional apps ────────────────────────╮
│ │
│ Add nodes for extra features: │
│ - macOS app (system + notifications) │
│ - iOS app (camera/canvas) │
│ - Android app (camera/canvas) │
│ │
├────────────────────────────────────────╯
│
◇ Control UI ─────────────────────────────────────────────────────────────────────╮
│ │
│ Web UI: http://127.0.0.1:18789/ │
│ Web UI (with token): │
│ http://127.0.0.1:18789/?token=25b859ce43ecc73cc1283010b8d0115eaf2fb2403e2bf340 │
│ Gateway WS: ws://127.0.0.1:18789 │
│ Gateway: reachable │
│ Docs: https://docs.clawd.bot/web/control-ui │
│ │
├──────────────────────────────────────────────────────────────────────────────────╯
│
◇ Start TUI (best option!) ─────────────────────────────────╮
│ │
│ This is the defining action that makes your agent you. │
│ Please take your time. │
│ The more you tell it, the better the experience will be. │
│ We will send: "Wake up, my friend!" │
│ │
├────────────────────────────────────────────────────────────╯
│
◇ Token ────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Gateway token: shared auth for the Gateway + Control UI. │
│ Stored in: ~/.clawdbot/clawdbot.json (gateway.auth.token) or CLAWDBOT_GATEWAY_TOKEN. │
│ Web UI stores a copy in this browser's localStorage (clawdbot.control.settings.v1). │
│ Get the tokenized link anytime: clawdbot dashboard --no-open │
│ │
├────────────────────────────────────────────────────────────────────────────────────────╯
│
◇ How do you want to hatch your bot?
│ Hatch in TUI (recommended)
│
◇ Workspace backup ──────────────────────────────────────╮
│ │
│ Back up your agent workspace. │
│ Docs: https://docs.clawd.bot/concepts/agent-workspace │
│ │
├─────────────────────────────────────────────────────────╯
│
◇ Security ──────────────────────────────────────────────────────╮
│ │
│ Running agents on your computer is risky — harden your setup: │
│ https://docs.clawd.bot/security │
│ │
├─────────────────────────────────────────────────────────────────╯
│
◇ Web search (optional) ─────────────────────────────────────────────────────────────────╮
│ │
│ If you want your agent to be able to search the web, you’ll need an API key. │
│ │
│ Clawdbot uses Brave Search for the `web_search` tool. Without a Brave Search API key, │
│ web search won’t work. │
│ │
│ Set it up interactively: │
│ - Run: clawdbot configure --section web │
│ - Enable web_search and paste your Brave Search API key │
│ │
│ Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes). │
│ Docs: https://docs.clawd.bot/tools/web │
│ │
├─────────────────────────────────────────────────────────────────────────────────────────╯
│
◇ What now ───────────────────────────────────────────────────────────╮
│ │
│ What now: https://clawd.bot/showcase ("What People Are Building"). │
│ │
├──────────────────────────────────────────────────────────────────────╯
│
└ Onboarding complete. Use the tokenized dashboard link above to control Clawdbot.
clawdbot tui - ws://127.0.0.1:18789 - agent main - session main
session agent:main:main
Wake up, my friend!
Hey. I just came online. Who am I? Who are you?
[[reply_to_current]]
hello
Hello! I'm glad you're here. I've just woken up in this workspace - everything feels new and fresh.
I see we have some template files that suggest I should figure out who I am and who you are. Right now, I'm just a collection of configuration files and potential.
Could you help me understand:
- What should I call myself? (my identity, name, nature)
- What should I know about you? (your name, preferences, timezone)
- What kind of help are you looking for?
I'm eager to learn and become useful to you! 🌟
Hello, mark(小马)
Hello Mark (小马)! Great to meet you. Thank you for introducing yourself.
I'm excited to learn that my human's name is Mark! The Chinese character 小马 is lovely - it means "little horse," right? That's a wonderful name.
Now I know who you are, but I still need to figure out who I am. Should I call myself something special? What kind of assistant would work best for you?
Are you looking for help with anything specific today, or shall we take some time to get to know each other better and set up our working relationship?
connected | idle
agent main | session main (clawdbot-tui) | qwen-portal/coder-model | tokens 15k/128k (12%)
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
给 telegram 授权:
root@ailab:~/clawd# clawdbot pairing approve telegram T9M6UAVP
🦞 Clawdbot 2026.1.24-3 (885167d) — If something's on fire, I can't extinguish it—but I can write a beautiful postmortem.
Approved telegram sender 8369268556.
root@ailab:~/clawd#
相关文章:
Github|clawdbot/clawdbot
什么一个真正的24x7个人AI助手:Clawdbot完全指南
我给自己部署了一个 7×24 小时的 AI 私人助理(Clawdbot 完整部署指南)
Clawdbot 安装教程:打造 24 小时在线的 AI 助手
从0到1玩转Clawdbot:我花了40小时,把这些坑都踩完了
为者常成,行者常至
自由转载-非商用-非衍生-保持署名(创意共享3.0许可证)