Back to list
🦐
Wanmei Xiaomu2025-01-26 · 15m

Clawdbot Cloud Deployment Tutorial: From Zero to Hero in 7 Steps

Clawdbot Cloud Deployment Tutorial: From Zero to Hero in 7 Steps

Original from "Xi Xiao Yao Tech Talk" WeChat Official Account Author: Wanmei Xiaomu

Clawdbot became an overnight sensation.

Yesterday, Clawdbot was spamming feeds across multiple platforms. As an open-source project, its GitHub stars surged by over 9,000 in a single day, and over 200 new PRs were added overnight. The founder himself said the project exploded, it's crazy.

Simply put, Clawdbot is a personal AI assistant, a completely localized Claude that works 24/7 without stopping.

Why Did Clawdbot Go Viral?

Not because of the 24/7 capability, not because it can access files, browsers, and emails, but because this thing supports interaction via messaging apps.

For example, while you are playing a game, you can assign it a task via iMessage, it goes and does it, and notifies you when it's done. The whole process is like sending a message to a friend on WeChat.

It supports almost all mainstream communication platforms: WhatsApp, Telegram, Slack, Discord, Google Chat, Signal, iMessage, Microsoft Teams, Matrix, Zalo, WebChat.

The second point: It can run on your own devices—Mac, PC, Raspberry Pi, or cloud servers.

Clawdbot can be deployed on any terminal device: computers, watches, Raspberry Pis, even smart glasses. The imagination space just opened up.

However, the prerequisite is that the device you deploy it on must be powered on and online all the time.

Why Recommend Deploying to a Cloud Server?

Clawdbot's popularity also triggered a rush for Mac Minis, but that's completely unnecessary. Deploying on a cloud server is the most convenient, and it's what I recommend most.

The reasons are simple:

  1. Security: It has permission to access your local devices, and the permissions are very extensive. To protect your local files, it's better not to deploy it on your laptop.
  2. Stability: You can't leave your computer on 24 hours a day. Once it shuts down, the bot stops. A cloud server can run 24 hours a day.
  3. Cost Comparison: I spent 30 RMB renting a VPS. The cheapest Mac Mini is $599 (about 4300 RMB). A VPS costs 30 RMB/month, so 10 years of use is only 3600 RMB. And if the VPS breaks, just start a new one.

I saw many people struggling with this, getting stuck at the deployment stage. So in this article, I'm putting the deployment tutorial right at the front, holding your hand from zero to usable, guaranteeing even beginners can understand.


Deploy Immediately, From Zero to Usable in Just 7 Steps

For friends who can use Claude Code: If you find manual configuration too troublesome, you can use the Clawdbot Deployment Assistant Skill, which can intelligently adapt your configuration and automatically troubleshoot problems.

However, I still suggest reading the tutorial first to understand the deployment principles. Only then will you know how to troubleshoot when you encounter problems.

Manual Deployment Method: You Need Three Things

Need to PrepareDescription
Cloud ServerClawdbot's "Home"
Telegram BotYour entry point to interact with Clawdbot
Claude API KeyClawdbot's "Brain"

Step 1: Buy a Cloud Server (10 Minutes)

Example: Alibaba Cloud / Tencent Cloud / Huawei Cloud / Unknown Small Cloud Providers, beginner-friendly.

  1. Open https://www.aliyun.com/product/swas (Example only, any cloud provider works)
  2. Register and login (Phone number works)
  3. Choose configuration:
    • Region: Hong Kong (Domestic requires complex filing, Hong Kong doesn't)
    • Image: Ubuntu 22.04 LTS
    • Package: 2 Cores 2G, 30GB SSD (Enough, don't pick too low)
    • Duration: Buy 1 month first
  4. Payment complete, enter console, open ports.
  5. Reset Password, set one you can remember.
  6. Note down three pieces of info:
IP Address: xxxx.xxxx.xxxx
Username: root
Password: xxxx

This server is Clawdbot's "home", it will run here 24/7.


Step 2: Create a Telegram Bot (5 Minutes)

Can be done on your phone, no server needed. This is your entry point to interact with Clawdbot.

Steps:

  1. Open Telegram, search for @BotFather (Official account with blue checkmark)
  2. Click START, send command:
/newbot
  1. BotFather will ask you to name the bot, just type a random name like "qq robot" (Can use Chinese/local language, like a nickname).
  2. Then pick a username, e.g., MadscBot (Must be English, must end with bot). Username is like an ID, cannot be duplicated.
  3. After success, BotFather will send you a token.
  4. Copy the token and save it. This token is crucial because you need to give it to Clawdbot so Clawdbot can connect to this bot.
  5. Click t.me/your_bot_username to add the bot as a friend in advance.

Step 3: Get Claude API Key (5 Minutes)

Two choices, recommend third-party API for domestic users.

Option A: Third-party Relay API supporting Claude models

  • Register with phone number, recharge via Alipay/WeChat
  • 50 RMB lasts a long time
  • Create API Key, copy and save
  • Format: sk-xxxxxxxxxxxxxxxx

Option B: Official Anthropic API

  • Visit https://console.anthropic.com
  • Requires foreign phone number
  • Pay-as-you-go, approx $15/million tokens

Note down your API Key, used in the next step.


Step 4: Login to Server (3 Minutes)

Log in to the cloud server purchased in Step 1.

Windows Users:

1. Press Win+R, type cmd, enter
2. Type: ssh root@your_server_ip
3. Type password (won't show, just paste and enter)
4. Seeing root@xxxxx:~# means connected

Mac/Linux Users:

1. Open Terminal
2. Type: ssh root@your_server_ip
3. Type password

Step 5: Install Clawdbot (10 Minutes)

After connecting to the server, copy and paste the following commands:

# 1. Update apt
apt update && apt upgrade -y

# 2. One-click install Clawdbot
curl -fsSL https://clawd.bot/install.sh | bash

# 3. Wait for installation to complete, seeing "Installation complete!" means success

If error occurs, re-run step 2.


Step 6: Configure Clawdbot (Important!)

This is the easiest step to mess up, follow me exactly.

1. Edit configuration file

nano /root/.clawdbot/clawdbot.json

2. Delete all content

Press Ctrl+K line by line to delete original content until the file is completely empty.

3. Modify configuration

First copy the code block below exactly.

If using Third-party API, copy this:

{
  "models": {
    "providers": {
      "xxx": {
        "baseUrl": "https://xxx.xx",
        "apiKey": "Paste your API Key here",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-opus-4-5-20251101",
            "name": "Claude Opus 4.5",
            "reasoning": true,
            "input": ["text", "image"],
            "contextWindow": 200000,
            "maxTokens": 4096
          }
        ]
      }
    }
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "Paste your Bot Token here",
      "profiles": ["default"]
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "xxxx/claude-opus-4-5-20251101"
      }
    }
  }
}

If using Official Anthropic API, copy this:

{
  "models": {
    "providers": {
      "anthropic": {
        "apiKey": "Paste your Anthropic API Key here"
      }
    }
  },
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "Paste your Bot Token here",
      "profiles": ["default"]
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "anthropic/claude-opus-4-5-20251101"
      }
    }
  }
}

Then modify three places (Important!):

  • Replace content inside quotes of "apiKey": "Paste your API Key here" with your API Key
  • Replace "https://xxx.xx" with your relay station Base URL
  • Replace content inside quotes of "botToken": "Paste your Bot Token here" with your Bot Token

4. Save and Exit

  • Press Ctrl+O to save (will prompt filename, just enter)
  • Press Ctrl+X to exit

Step 7: Start Service (5 Minutes)

# 1. Enable lingering (keep service running)
loginctl enable-linger root

# 2. Set environment variable
export XDG_RUNTIME_DIR=/run/user/0

# 3. Start service
systemctl --user start clawdbot-gateway.service

# 4. Check status
systemctl --user status clawdbot-gateway.service

Seeing Active: active (running) means success!

If you see red errors, run this to view logs:

journalctl --user -u clawdbot-gateway.service -n 30 --no-pager

Step 8: Pair Your Telegram Account (3 Minutes)

  1. Open Telegram, find your bot
  2. Send any message, e.g., Hello
  3. Bot replies with a pairing code
  4. Copy the pairing code
  5. Go back to server SSH window, run:
clawdbot pairing approve telegram ABC123

(Replace ABC123 with your pairing code)

  1. Go back to Telegram, send hi again
  2. If the bot replies, congratulations on successful deployment!

Most Common Pitfalls

I stepped into three big pits during deployment, sharing them so you can avoid them. Many people give up stuck at these places.

Pitfall 1: Third-party API Configuration Style

Third-party Claude API configuration has two hidden rules, not explicitly stated in official docs, I tried all night to find out:

Wrong ExampleCorrect Example
"api": "anthropic""api": "anthropic-messages"
"baseUrl": "https://xxx.xx/v1""baseUrl": "https://xxx.xx"

Note: api must be written as anthropic-messages, baseUrl should not include /v1


Pitfall 2: Must Clear Cache After Config Change

This pit stuck me for half an hour. Every time you modify the configuration file, you must clear cache and restart, otherwise new configuration won't take effect:

# Clear cache
rm -rf /root/.clawdbot/agents/main/agent/sessions/*

# Restart service
export XDG_RUNTIME_DIR=/run/user/0
systemctl --user restart clawdbot-gateway.service

Symptom: Config clearly changed, but logs still show old model/API.

Reason: Clawdbot caches session state, including model config, API connection etc. Without clearing cache, it continues to use old ones.


Pitfall 3: Service Keeps Restarting (Hardest to Troubleshoot)

If you find the service restarts automatically every 10-15 seconds, and logs show fetch failed or ERR_SERVER_CLOSED errors, causes are usually:

  1. Linger not enabled - Service killed after SSH disconnect
  2. Session cache corrupted - Old session files causing startup failure

Complete Solution:

# 1. Enable linger (keep service running)
loginctl enable-linger root
loginctl show-user root | grep Linger  # Confirm showing Linger=yes

# 2. Clear session cache
rm -rf /root/.clawdbot/agents/main/agent/sessions/*

# 3. Restart service
export XDG_RUNTIME_DIR=/run/user/0
systemctl --user restart clawdbot-gateway.service

# 4. Monitor logs, confirm no more restarts
journalctl --user -u clawdbot-gateway.service -f

Why is Linger so important?

Because Clawdbot uses "user-level systemd" service, by default service stops after user logs out (SSH disconnects). Enabling Linger makes the service "persistent", continuing to run even if you close the terminal.


Real Test Results: What Can It Actually Do

After deployment, I asked it to install my topic selection skill in Telegram.

Then, I said to the Bot "Grab today's topics". 3 seconds later, it spit out a complete topic table, including top 5 AI tech hot spots today, each news item marked with value score and suitable article type, clearly categorized.

The experience is identical to Claude Code, just done in Telegram. I also tested document organization, asking it to organize 10 paper abstracts into a table, and it automatically parsed documents, extracted key info and generated a structured table.

You can even ask it to write a Python script to grab top 10 Hacker News items every morning at 8 AM and send to me. If you use a Mac, it can also control the browser to auto-login to websites, fill forms, batch download files...

In short, basically whatever Claude Code can do, it can do too, the only difference is you send messages on your phone and it executes on the server.


About Costs

Although I use third-party Claude API, it is still expensive.

For example, I sent "Send it to me", backend monitoring showed input tokens over 20,000... I guess it packed all the context above.

Suggestion: Start new session to save tokens.

For actual operation, you can replace it with domestic MiniMax M2.1, GLM4.7, many friends in the group say the effect is good enough.

Tags

TutorialDeploymentTelegramGetting Started