Telegram bot hosting on a VPS that runs 24/7
Telegram bot hosting on a VPS keeps your bot online around the clock, with no cold starts and no sleeping. 0x.cloud servers start at $4.49 a month (or bill by the hour) and run in Warsaw. The "Bots" image ships with Python and Telegram libraries, Node.js with pm2, and a service that keeps your bot running.
Why a VPS beats free Telegram bot hosting
Searches for "telegram bot hosting free 24/7" are popular for a reason: everyone wants a bot that never goes down for $0. The catch is that free tiers typically sleep an app with no traffic or cap its monthly hours, so your bot answers late or not at all. Your laptop has the same problem whenever it sleeps.
A VPS gives you:
- A process that stays up. A systemd service or pm2 restarts the bot after a crash or reboot.
- Root access. Any Python or Node.js version, your own database (SQLite, PostgreSQL, Redis), cron jobs for broadcasts.
- Predictable cost. Unmetered traffic at up to 1 Gbps and a price locked for the term you pay.
Best VPS for a Telegram bot: which plan
Bots run out of memory long before they run out of CPU. Our post on how much RAM a bot needs covers the details. The short version:
| Your bot | Plan | Specs | Monthly |
|---|---|---|---|
| Commands, menus, notifications | s1-1 | 1 vCPU, 1 GB RAM, 15 GB NVMe | $4.49 |
| Calls an LLM, takes payments, uses a DB | s1-2 | 1 vCPU, 2 GB RAM, 30 GB NVMe | $7.99 |
| Several bots, a database | s2-4 | 2 vCPU, 4 GB RAM, 60 GB NVMe | $15.99 |
Not sure? Start hourly, watch free -h under real traffic, then switch to monthly or prepay a year for 12% off.
Telegram bot hosting for Python and Node.js in 5 minutes
- Create a server: s1-1 or s1-2 with the "Bots" image (or plain Ubuntu 24.04).
- Open the web console and pull your code with
git clone. - Put the @BotFather token in an
.envfile (chmod 600), never in the repo. - Install dependencies and run the bot as a service.
For a Python bot, a systemd unit is all you need:
# /etc/systemd/system/mybot.service
[Unit]
Description=Telegram bot
After=network-online.target
Wants=network-online.target
[Service]
WorkingDirectory=/opt/mybot
EnvironmentFile=/opt/mybot/.env
ExecStart=/opt/mybot/venv/bin/python bot.py
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now mybot # start now and on every boot
journalctl -u mybot -f # follow the logs
On Node.js, use pm2: pm2 start bot.js --name mybot, then pm2 save and pm2 startup so it comes back after a reboot. Full walkthroughs: Python Telegram bot and Node.js Telegram bot. General tips for Python apps live on our Python VPS hosting page.
Or let your AI agent deploy it
0x.cloud has an MCP server for Claude, ChatGPT and Cursor, plus a REST API. Your agent gets an exact quote with dry_run, creates the server and deploys the code, all within the monthly spend limit on its API key.
Create an s1-1 server on 0x.cloud with the Bots image. Clone my Telegram bot repo, put the token in .env, run the bot as a systemd service and show me the last log lines. Show me the dry_run price before creating anything.
Polling or webhook?
Long polling is the easy default: the bot connects out to Telegram and needs no open ports. Webhooks need a public HTTPS address (see the Bot API docs), and 0x.cloud servers have none, so run your bot with long polling.
Telegram bot hosting options compared
| Option | Runs 24/7 | Root and custom packages | Cost | Fits |
|---|---|---|---|---|
| Your own computer | only while it's on | yes | electricity | development |
| Free PaaS tier | depends on the tier's limits | no | $0 within limits | learning projects |
| Paid PaaS | yes | limited | depends on plan and usage | Git push deploys without managing an OS |
| 0x.cloud VPS | yes | yes | from $4.49/mo or hourly | production bots, several bots per server |
One VPS can run several bots and a database for a single price. See every plan on the pricing page.
Telegram bot hosting FAQ
Is there free Telegram bot hosting that runs 24/7? Free tiers usually sleep idle apps or cap monthly hours, so a bot misses or delays messages. For a bot that answers around the clock, use a small always-on VPS. On 0x.cloud that starts at $4.49 a month.
How much RAM does a Telegram bot need? A simple bot on python-telegram-bot, aiogram or grammY fits in 1 GB of RAM. Bots that call an LLM, keep a database or serve many chats are safer with 2 GB.
Do I need a public IP or open ports? Not for long polling: the bot connects out to api.telegram.org, and outgoing connections work on every server. Webhooks need an HTTPS address that Telegram can reach from the internet; 0x.cloud servers have no public address, so use long polling.
How do I keep a Python bot running after I close the console? Run it as a systemd service with Restart=always, or use pm2 for Node.js. The bot then survives logouts, crashes and reboots.
Can I host several bots on one server? Yes. Give each bot its own service and environment file. Two or three light bots fit on s1-2; a busier setup with a database fits on s2-4.