Telegram Bot Hosting: What It Costs to Keep a Bot Running

The Telegram Bot API is free, so running a bot comes down to the server, database, outside services and maintenance. Where to host a bot, polling vs webhook, and what happens when the server goes down.

5 min read

In this article
  1. Where can a Telegram bot run?
  2. Polling or webhook — what's the difference for hosting?
  3. What happens when the server goes down?
  4. What drives the cost of running a bot?
  5. Who should maintain the bot, and what should you check?
  6. What to do tomorrow
  7. Frequently asked questions

The Telegram Bot API is free, so the cost of running a bot comes from the server its program runs on, the database, outside services (such as AI model requests) and maintenance. A simple bot runs fine on a small virtual server costing a few euros a month, and costs grow not with the number of messages but with what the bot does with each one.

Below: where to host a bot, how polling and webhooks differ, what happens when the server goes down, and who should look after it all.

Where can a Telegram bot run?

Option How it works Best for
Virtual server (VPS) The bot runs continuously; you or a contractor maintain the OS and updates Most business bots; several bots on one server
Cloud platform (PaaS) You push code, the platform starts and restarts it When you don't want to manage a server; cost grows with resources
Serverless functions Code runs only when a message arrives (via webhook) Rarely used bots; execution time is limited
Your computer or an office server Works while the computer is on and online Testing only — computer off, bot silent

For most business bots a VPS or a cloud platform fits best. Serverless suits simple bots, but longer tasks — file processing, reports, AI replies — may not fit within execution time limits.

Polling or webhook — what's the difference for hosting?

Telegram delivers messages to a bot in two ways:

  • Polling (getUpdates). The bot keeps asking Telegram whether there are new messages. It needs a continuously running process but no public address.
  • Webhook. Telegram sends each message to your address. It needs a public HTTPS address — Telegram supports only ports 443, 80, 88 and 8443 — but it works with serverless.

You can't use both at once: while a webhook is set, getUpdates doesn't work. How a bot works under the hood is covered in how Telegram bots work.

What happens when the server goes down?

Telegram keeps undelivered updates on its servers for up to 24 hours. If the bot comes back sooner, it receives the backlog; if not, the messages are lost. With a webhook, Telegram retries failed requests but gives up after a number of attempts.

So hosting isn't just a server — it comes with a few safety nets:

  • Automatic restart. If the program crashes, it should come back on its own (for example via systemd or a Docker restart policy).
  • Monitoring. An alert to you when the bot stops responding, so you don't hear about it from customers.
  • Logs. What happened before the crash — without them the cause is guesswork.
  • Database backups — daily, stored elsewhere.
  • Handling stale messages. After a long outage a bot may answer messages that are hours old. Sometimes it's wiser to skip them — Telegram has the drop_pending_updates parameter for that.

What drives the cost of running a bot?

We don't publish a fixed maintenance price — it depends on the bot. The costs are:

  • Telegram Bot API — free. There's no per-message fee, unlike SMS. See the comparison in Telegram vs email vs SMS.
  • The server. How much memory and CPU you need. A simple bot needs very little; a bot that processes photos or generates PDFs needs more.
  • The database. A small bot can keep its database on the same server (then backups are your responsibility); a managed database costs extra, but the provider handles backups.
  • Files. Storage and traffic for photos and documents.
  • Outside services. AI model requests are billed by tokens used and often become a bigger line than the server. Also payment provider fees and email sending.
  • Maintenance. OS and library updates, certificates, monitoring, responding to failures.

A simple and a complex bot

Simple bot Complex bot
What it does Forwards website enquiries to Telegram Takes payments, replies with AI, has an admin panel
Server A small VPS, often shared with other bots A dedicated server or platform with headroom
Data No database or a small table A database with daily backups
Outside services None An AI model, a payment provider
Maintenance Occasional updates Monitoring, regular updates, AI spending limits

What it costs to build the bot in the first place is a separate topic — Telegram bot development cost.

Who should maintain the bot, and what should you check?

  • The bot's owner. A bot is controlled by the Telegram account that created it through BotFather. Ideally that's a company account, not a contractor's personal one.
  • The bot token. Kept on the server as a secret — not in the code and not in chats. If it leaks, the BotFather /revoke command issues a new one and the old one stops working.
  • Server and domain — registered in your name, with access details you hold.
  • A responsible person — who updates, who gets failure alerts and how fast they respond.

We build and maintain Telegram bots, from the server and monitoring to updates. Describe your bot and we'll tell you where to host it and what running it will cost. More on the Telegram bots page.

What to do tomorrow

  1. Check which Telegram account created your bot and whose name the server is registered in.
  2. Ask yourself: how will you know the bot has stopped responding? If the answer is "when a customer calls", you need monitoring.
  3. If the bot uses AI, set a monthly spending limit in the AI service account.

Frequently asked questions

How much does Telegram bot hosting cost per month?

A simple bot runs fine on a small virtual server costing a few euros a month; the Bot API is free. The database, files, AI requests and maintenance cost more.

Can I host a Telegram bot for free?

Some platforms have free tiers, but with limits: the app goes to sleep, run time is capped. For a business bot that must always answer, that's a risk.

Can the bot run on the same server as my website?

Yes, if the server has enough resources. But then a failure in one can affect the other, so for important bots a separate process with its own monitoring is better.

What happens to messages while the bot is down?

Telegram keeps them for up to 24 hours. If the bot comes back within that time it receives them; after that they're lost.

Does a bot need a domain?

With polling, no. With a webhook you need a public HTTPS address: your own domain or one provided by the platform.

More posts

All posts