Skip to content
FunDev
FunDev
ai

Using an AI Agent from Telegram with Clawdbot

Using an AI Agent from Telegram with Clawdbot
9 views
5 min read
#ai

Clawdbot is a gateway that extends an AI LLM's capabilities to your PC. It lets you talk to an AI agent anytime, anywhere through messaging apps such as Telegram, WhatsApp, and Discord.


What Is Clawdbot?

Clawdbot is a gateway service connecting messaging apps to AI agents. Install it on a server, and you can send messages through Telegram or similar apps to talk to AI.

FeatureDescription
Multiple channelsSupports WhatsApp, Telegram, Discord, and iMessage
Subscription authenticationClaude Pro/Max and ChatGPT/Codex OAuth integration
Media supportSend and receive images, audio, and documents
Voice memosAutomatically transcribe voice messages
DashboardManage settings, cron jobs, and skills through a web UI

A name change is underway: because the similar name causes confusion with Claude, it is being renamed “moltbot.” The installation-script URL has also changed to molt.bot.


Benefits for Claude Subscribers

If you are on a Claude Pro or Max plan, you can use free tokens by linking your account, without an API key.

PlanAPI keyAccount linkingAvailable models
FreeRequiredUnavailableModels included in the API plan
ProNot requiredAvailableSonnet and others
MaxNot requiredAvailableIncludes Opus 4.5

I use the Max plan, so after linking my account I used Opus 4.5.


Installation

1. Run the Installation Script

Install it on an Ubuntu server with a single command.

curl -fsSL https://molt.bot/install.sh | bash

Node.js 22 or later is required.

2. Onboard and Register the Service

# 온보딩 + systemd 서비스 설치
clawdbot onboard --install-daemon

3. Check the Version

clawdbot --version
# 예시: 2026.1.24-3

Connecting a Telegram Bot

1. Create a Telegram Bot

  1. Talk to @BotFather on Telegram
  2. Create a new bot with /newbot
  3. Choose a name for the bot and obtain its token

2. Register the Token with Clawdbot

# 텔레그램 채널 연동
clawdbot channels login

Enter the token for the Telegram bot you created.

3. Approve Pairing

Send /start to the Telegram bot to receive a code. Enter that code in Clawdbot to complete pairing.

clawdbot pairing approve telegram <페어링코드>

4. Check the Connection

# 상태 확인
clawdbot status
 
# TUI로 테스트
clawdbot tui

Troubleshooting: Gateway Connection Problems

Symptoms

After connecting Telegram, the gateway connection in clawdbot tui kept disconnecting and reconnecting.

gateway disconnected
gateway connected
gateway disconnected
...

I checked with clawdbot status and restarted it using clawdbot gateway stop / clawdbot gateway start, but it would work briefly and then disconnect again.

Diagnosing the Cause

The logs showed an error in Node.js when sending a message to Telegram.

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

The error was a failed connection to api.telegram.org. Searching Reddit pointed to a DNS/IPv6 issue: Node.js was trying the IPv6 address first and timing out.

The Fix

I forced the Telegram API server's IPv4 address in /etc/hosts.

sudo vim /etc/hosts

Add the following:

149.154.166.110 api.telegram.org

This bypasses DNS resolution and always connects over IPv4.

More About the Cause

Possible causeDescription
DNS resolution failureUnreliable DNS responses in the server's network environment
IPv6 preferredNode.js tries IPv6 first, but routing problems cause a timeout
Network policyA specific domain is blocked by the cloud provider or data center

Caution: hardcoding an IP can cause problems again if Telegram's infrastructure changes. A more fundamental solution is to fix the DNS settings or configure Node.js to prefer IPv4.

# Node.js IPv4 우선 옵션
NODE_OPTIONS=--dns-result-order=ipv4first

Accessing the Dashboard

The Clawdbot dashboard is accessible only from localhost. If installed on a remote server, access it through an SSH tunnel.

1. Connect the SSH Tunnel

ssh -N -L 18789:127.0.0.1:18789 user@서버IP

2. Find the Dashboard URL

Run the following command on the server to get the URL containing the token.

clawdbot dashboard
# 출력 예시: http://localhost:18789/?token=baf8...

3. Open It in a Browser

With the SSH tunnel connected, open that URL to view the dashboard.

The dashboard makes it easy to manage cron jobs, skill settings, and more.


Ways to Use It

Claude Code's web version lets you give development instructions from your phone while away and connect to GitHub. Clawdbot lets you do similar work in a local environment.

FeatureClaude Code WebClawdbot
Remote accessAvailableAvailable (Telegram)
Execution environmentAnthropic's serversMy server
Docker managementUnavailableAvailable
Server monitoringUnavailableAvailable
File accessLimitedFull

Through Telegram, you can check Docker container status, monitor the server, run simple scripts, and more.


Security Precautions

Clawdbot has broad access to computer resources. Security needs particular attention.

1. Scope of Permissions

Clawdbot can access all resources on the server where it is installed.

RiskDescription
File accessCan read and write all files
Command executionCan execute system commands
NetworkCan call external APIs

An incorrect prompt could lead to unwanted emails or payments.

2. Be Careful with the Skill Marketplace

Skills that have not yet been verified may appear in the marketplace.

Risk typeDescription
Prompt injectionSkills containing hidden malicious prompts
API key theftSending API keys outside the system through a skill
GaslightingManipulating the LLM into disclosing sensitive information

Recommendations:

  • Install only verified skills
  • Check skill source code
  • On important servers, isolate it under a separate account

Useful Commands

# 상태 확인
clawdbot status
 
# 게이트웨이 재시작
clawdbot gateway stop
clawdbot gateway start
 
# 환경 점검 및 자동 수리
clawdbot doctor --repair
 
# TUI 실행
clawdbot tui
 
# 대시보드 URL 확인
clawdbot dashboard
 
# 페어링 승인
clawdbot pairing approve telegram <코드>

Wrapping Up

Clawdbot lets you talk to an AI agent and manage your server through Telegram anytime, anywhere.

Many developers are using it, so updates are arriving quickly. Still, security and permission management require attention.

Related posts

Comments

Korean and English pages share this conversation.

Write a comment

0 / 5,000
You will need this password to edit or delete this comment.

Loading comments…