Home / Use cases / Telegram bots

Telegram bots that never sleep

A bot must answer in two seconds, at 4 a.m., after a crash, on New Year's Eve. That is what a VPS does.

Why not a free host?

Free Python hosts sleep after inactivity, and the first user after a nap waits half a minute for an answer. Some cap daily execution. Some stop your bot for using too much of the free quota — which any live bot eventually does. A €3 VPS has none of these limits: your process runs until you stop it.

What the €3 NAT plan gives a bot

1 GB RAM is plenty: a Python bot with the popular library idles around 150 MB, and a Node.js bot around 80 MB. 10 GB of NVMe holds the code, the database and months of logs. The shared IPv4 with 10 forwarded ports is invisible to bots — Telegram polling connects outward, and webhooks work through a forwarded port.

One honest note: NAT plans are located in the US. Bots do not care where they run; if you need a European IP, take Buran-1 in Frankfurt for €6.5.

The setup, in one guide

Python bot, systemd auto-restart, survives reboots — the whole walkthrough with real commands is in Deploy a Telegram bot in 10 minutes. Add PostgreSQL later when the bot grows a database: PostgreSQL guide.

Polling or webhooks?

Polling is simpler: no domain, no HTTPS, works behind NAT. Webhooks answer faster and use fewer resources, but need a domain and a certificate. Start with polling — switch when your bot serves thousands of users.

When the bot grows

Bots that send broadcasts, store users or process files want more RAM and a database. Buran-1 (2 GB) or Buran-2 (4 GB) with PostgreSQL handles tens of thousands of users. Upgrading is one click with prorated billing — no migration ceremony.

Quick answers

Will a €3 NAT plan really run my bot?

Yes, if the bot is a normal Telegram bot. The NAT box cannot host a public website on ports 80 and 443, but bots, API clients and tunnels work fine.

What happens if my bot crashes?

systemd restarts it in about three seconds. You configure it once — the commands are in the bot guide — and the bot survives crashes, reboots and its own bugs.

Can I run several bots on one VPS?

Yes. Each bot is a small process with its own systemd service. A 1 GB NAT box runs a handful of small bots; a 2 GB server runs a dozen or more.

Start with the plan bots actually need: Buran NAT, €3/mo.

Related