The key question: webhook or polling
With a webhook Telegram sends each update to your HTTPS URL, so the code only runs when needed. With long polling your process must stay connected all day. Free plans that sleep break polling. See Webhook vs polling: hosting impact.
Free options
| Option | Webhook | Long polling | Limit |
|---|---|---|---|
| Cloudflare Workers | Yes | No | 100,000 requests/day, 10 ms CPU per request on the free plan |
| Railway Free | Yes | Yes | $1/month of usage, up to 0.5 GB per service: only a very small bot |
| Render free web | Yes, with cold starts | No | Sleeps after 15 minutes without traffic |
| Oracle Cloud Always Free | Yes | Yes | Capacity errors; idle instances can be reclaimed |
| Your computer / Raspberry Pi | Needs a tunnel | Yes | Power and home internet |
Prices verified on 2026-10-19 on the providers' official pricing pages. They change: check before you buy.
Recommended free path
- Download the Cloudflare Workers Telegram template.
- Deploy with
npx wrangler deployand store BOT_TOKEN and WEBHOOK_SECRET as secrets. - Register commands with the Bot command generator and send a test message with the Telegram/Discord webhook tester.
When to pay
If you need long polling, heavy libraries, files on disk or long-running AI calls, the cheapest always-on options are listed in Cheapest always-on bot hosting. The easiest is Railway Hobby; the most control per dollar is a small Vultr VPS.
Related guides and tools
- Best hosting for Telegram bots
- Webhook vs polling: hosting impact
- Cheapest always-on bot hosting
- Bot command generator
- Telegram/Discord webhook tester
- Starter templates
Frequently asked questions
Can I host a Telegram bot for free forever?
A webhook bot on Cloudflare Workers' free plan can run indefinitely within its limits; free plans can change, so check the official limits.
Why does my bot stop on a free tier?
Free web tiers that sleep stop long polling; switch to a webhook or an always-on plan.
Is it safe to give my token to a free host website?
No. Never paste a bot token into a third-party form; deploy your own code to a provider account you control.