Back to Article List

Connect OpenClaw to Telegram using BotFather

Connect OpenClaw to Telegram using BotFather

If you see “BotFather” in OpenClaw guides and you’re thinking “cool, what is that?”, this article is for you.

BotFather is Telegram’s official bot management account. It creates Telegram bots and hands you a token. OpenClaw uses that token to connect your Telegram bot to your self-hosted agent running on a VPS or home server.

So the relationship is simple: BotFather creates the Telegram bot and OpenClaw is the brain that replies to messages through it.

If you want a broader overview first, read what OpenClaw is and how it works. If you just installed OpenClaw and want a general sanity check, your first message to OpenClaw covers the basic end-to-end idea.

What you need before you start

  • A OpenClaw install that can run the Gateway
  • Access to your OpenClaw config file on the server
  • A Telegram account to talk to BotFather

If you are onboarding on a VPS over SSH and want to keep the web UI private, use the LumaDock KB guide for secure SSH port forwarding: OpenClaw quickstart onboarding over SSH.

Step 1: Create a Telegram bot with BotFather

Open Telegram and search for @BotFather. Start the chat and send:

/newbot

BotFather asks for two things:

  • Bot name which is the display name people see
  • Username which must be unique and must end in bot (example: my_openclaw_helper_bot)

When you finish, BotFather gives you a bot token. It looks like a long string with a colon in the middle.

Do not paste that token into chat rooms and do not commit it to Git. Anyone with it can impersonate your bot. Telegram’s own tutorial describes the token step in the official docs: From BotFather to “Hello World”.

Step 2: Add the token to OpenClaw config

On your server, open your OpenClaw config file and add Telegram under channels.

Example:

{
  "channels": {
    "telegram": {
      "enabled": true,
      "botToken": "PASTE_YOUR_TOKEN_HERE",
      "dmPolicy": "pairing"
    }
  }
}

dmPolicy pairing is a good default. It means random people who discover your bot username do not get full access.

After saving config, restart your OpenClaw Gateway if it’s already running.

Step 3: Start the Gateway and confirm it’s listening

Start the Gateway in a terminal session:

openclaw gateway --port 18789 --verbose

If you are hosting on a VPS, do not expose port 18789 publicly. Keep it bound to localhost and use SSH port forwarding or a private tunnel. Your security baseline is covered here: how to host OpenClaw securely on a VPS.

Step 4: Send /start then approve pairing

In Telegram, search for your bot username, open the chat, and send:

/start

If pairing is enabled, OpenClaw replies with a pairing code. Approve it on your server:

openclaw pairing approve telegram YOUR_CODE_HERE

Now send your first real message:

Hello

You should get a reply in a few seconds.

What just happened

Telegram routes your message to your bot identity based on the token you got from BotFather. OpenClaw listens for those updates through the Gateway, calls your model provider, then replies back through Telegram.

If you also want Telegram as part of a multi-channel setup (WhatsApp, Discord, Slack), read OpenClaw multi-channel setup.

Common problems and quick fixes

Bot does not reply to /start

  • Confirm the Gateway is running
  • Confirm the token was pasted correctly
  • Check logs for errors then retry /start

Token is invalid

  • Copy the token again directly from BotFather
  • If you leaked it, revoke it immediately and generate a new one

Pairing code expired

  • Send /start again to generate a new code then approve it quickly

Bot replies but feels “dumb” or slow

Your idea deserves better hosting

24/7 support 30-day money-back guarantee Cancel anytime
Abonament

VPS.S1

$5.99 Save  17 %
$4.99 Lunar
  • 2 vCPU AMD EPYC
  • 2 GB RAMMEMORIE
  • 30 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse

VPS.S3

$14.99 Save  33 %
$9.99 Lunar
  • 4 vCPU AMD EPYC
  • 6 GB RAMMEMORIE
  • 70 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse

EPYC VPS.P1

$8.99 Save  22 %
$6.99 Lunar
  • 2 vCPU AMD EPYC
  • 4 GB RAMMEMORIE
  • 40 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P2

$16.99 Save  24 %
$12.99 Lunar
  • 2 vCPU AMD EPYC
  • 8 GB RAMMEMORIE
  • 80 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P4

$29.99 Save  23 %
$22.99 Lunar
  • 4 vCPU AMD EPYC
  • 16 GB RAMMEMORIE
  • 160 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P5

$39.99 Save  25 %
$29.99 Lunar
  • 8 vCPU AMD EPYC
  • 16 GB RAMMEMORIE
  • 180 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P6

$59.99 Save  25 %
$44.99 Lunar
  • 8 vCPU AMD EPYC
  • 32 GB RAMMEMORIE
  • 200 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

EPYC VPS.P7

$69.99 Save  29 %
$49.99 Lunar
  • 16 vCPU AMD EPYC
  • 32 GB RAMMEMORIE
  • 240 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G2

$24.99 Save  20 %
$19.99 Lunar
  • 2 vCPUAMD EPYC Genoa generația a 4-a 9xx4 cu 3,25 GHz sau similar, pe arhitectura Zen 4. AMD EPYC G4
  • 4 GB DDR5MEMORIE
  • 50 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G4

$44.99 Save  22 %
$34.99 Lunar
  • 4 vCPUProcesor AMD EPYC cu nuclee vCPU dedicate, pe hardware de server pentru companii. AMD EPYC G4
  • 8 GB DDR5MEMORIE
  • 100 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G6

$89.99 Save  22 %
$69.99 Lunar
  • 8 vCPUProcesor AMD EPYC cu nuclee vCPU dedicate, pe hardware de server pentru companii. AMD EPYC G4
  • 16 GB DDR5MEMORIE
  • 200 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

Genoa VPS.G7

$159.99 Save  22 %
$124.99 Lunar
  • 8 vCPUProcesor AMD EPYC cu nuclee vCPU dedicate, pe hardware de server pentru companii. AMD EPYC G4
  • 32 GB DDR5MEMORIE
  • 250 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos. incluse
  • Backup automat gratuitInclude un spațiu de backup pe care îl poți configura pentru rulare zilnică, săptămânală sau lunară.

AMD Ryzen VPS.R1

$16.99 Save  18 %
$13.99 Lunar
  • 1 CPU dedicat AMD Ryzen 9 7950X cu 4,5 GHz sau similar, pe arhitectura Zen 4. vCPU
  • 4 GB DDR5MEMORIE
  • 50 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6 incluse Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos.
  • Backup automat inclus

AMD Ryzen VPS.R2

$29.99 Save  17 %
$24.99 Lunar
  • 2 CPU dedicate AMD Ryzen 9 7950X cu 4,5 GHz sau similar, pe arhitectura Zen 4. vCPU
  • 8 GB DDR5MEMORIE
  • 100 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6 incluse Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos.
  • Backup automat inclus

AMD Ryzen VPS.R4

$109.99 Save  18 %
$89.99 Lunar
  • 8 CPU dedicate AMD Ryzen 9 7950X cu 4,5 GHz sau similar, pe arhitectura Zen 4. vCPU
  • 32 GB DDR5MEMORIE
  • 400 GB NVMeSTOCARE
  • Trafic nelimitat
  • IPv4 & IPv6 incluse Suportul IPv6 este momentan indisponibil în Franța, Finlanda sau Țările de Jos.
  • Backup automat inclus

FAQ

How do I connect OpenClaw to Telegram using BotFather?

Create a Telegram bot with /newbot in BotFather, copy the token into OpenClaw config, start the Gateway, then /start the bot and approve pairing.

Automate faster, for less

Bring your winning ideas to life with AMD power, NVMe speed and unmetered bandwidth. Deploy your VPS in seconds, with a pre-installed OpenClaw template on Ubuntu 24.04.

GPU products are in high demand at the moment. Fill the form to get notified as soon as your preferred GPU server is back in stock.