Telegram bot hosting from $1 a month
A Telegram bot has to run somewhere that stays on. Your own computer sleeps, and free hosting platforms put idle apps to sleep. A small natbox server runs your bot 24/7 with root SSH, so you can use any language and library: python-telegram-bot, aiogram, Telegraf, grammY or your own code.
Order Nano · Try it free for a month
Which plan for a Telegram bot
| Plan | RAM | Good for | Price |
|---|---|---|---|
| Nano | 512 MB | One or a few bots in Python or Node.js | $1.00 a month |
| Box | 1 GB | Several bots, or a bot with a database | $1.25 a month |
| Box Plus | 2 GB | Busy bots, or bots that handle media | $2.25 a month |
Long polling or webhooks
- Long polling works with no setup. Your bot connects out to Telegram and asks for updates, so it needs no open port. This is the easiest choice for most bots.
- Webhooks need HTTPS on port 443. Link your domain in the Domains tab of the client area, and ports 80 and 443 for that domain go to your server. Get a free certificate with Let's Encrypt or Caddy.
How to set up your bot
- Create the bot with @BotFather and copy its token.
- Order a server and log in over SSH.
- Install your bot and its packages.
- Run it as a systemd service, so it starts on boot and restarts after a crash.
The step-by-step guide, with a working Python example: Host a Telegram bot 24/7.
Good to know
- Telegram's API is reached over HTTPS, so nothing is blocked. Only outgoing mail ports 25, 465 and 587 are closed.
- Docker is not supported. Run the bot directly with Python or Node.js, which also uses less memory.
- Bots that send spam or mass messages break our acceptable use policy, and Telegram's rules too.
Telegram bot hosting questions
Is 512 MB of RAM enough for a Telegram bot?
Yes, for most bots. A typical Python bot uses 50 to 150 MB, so Nano runs one comfortably, often several.
Can I run a Telegram bot for free?
For a month, yes: new customers get a free trial server with 256 MB RAM, enough for a small bot. See the free VPS trial.
Will my bot keep running if I close SSH?
Yes, if you run it as a systemd service, as the guide shows. It keeps running and starts again after a reboot.
Can I run a Discord bot on the same server?
Yes. One server can run as many bots as fit in its memory. See Discord bot hosting.
Also useful: Run a Python API, PostgreSQL on a small server.