EnglishTelegram Automation

How to Host a Telegram Bot for Free 24/7 (and Why Free Hosting Keeps Sleeping)

Learn how to host a Telegram bot for free 24/7 without a VPS: the free options that actually stay awake, why Render keeps sleeping, and the managed route.

By GetMyChat Team · Published 14 November 2026

How to Host a Telegram Bot for Free 24/7 (and Why Free Hosting Keeps Sleeping)

Yes, you can host a Telegram bot for free and keep it online 24/7 — but most "free" hosting is not really 24/7. The free options that actually stay awake are bot-specific hosts with no sleep mode, or a serverless webhook setup like Google Apps Script. Famous general-purpose free tiers, like Render's free plan, spin your service down after 15 minutes without traffic — and a sleeping bot misses messages. This guide shows the free options that work, the traps to avoid, and the managed route if you would rather not babysit a server.

Don't want to manage hosting at all? GetMyChat hosts and runs Telegram bots for you — bot hosting and automation is one of our core services, alongside Telegram-to-WhatsApp forwarding, Telegram-to-Discord, Telegram-to-X posting, and Instagram automation through Meta's official API. Message us on Instagram @getmychat.in, on X @getmychat, or on WhatsApp +91 93184 19758 and tell us what your bot should do — we keep it online so you don't have to.

How does a Telegram bot stay online?

A Telegram bot is a small program that talks to Telegram's servers through the official Bot API. Telegram charges nothing for the Bot API — creating the bot and using the API is free. What costs money (or effort) is the computer the program runs on. Your bot gets new messages in one of two ways, and the choice decides what kind of hosting you need:

Long polling: your bot program runs non-stop and keeps asking Telegram, "any new messages?" every few seconds. This needs a process that never sleeps. If the process stops, messages pile up unread until it restarts.

Webhook: Telegram pushes each new message to your bot the moment it arrives, calling a web address (URL) you registered with the setWebhook method. Your code only runs when a message arrives, so it can live on serverless platforms that wake up on demand — no always-on server needed. The catch: the webhook URL needs a valid SSL certificate, and Telegram only calls ports 443, 80, 88, and 8443.

That distinction is the whole game. Long polling needs an always-on host. Webhooks can run on free serverless platforms. Pick your method first, then your host.

The three traps of free hosting

Every free hosting offer fails in one of three ways. Knowing the traps saves you from picking a host that looks free and quietly stops working.

Trap 1: sleep. The host stops your process after a period without incoming web traffic and restarts it on the next request. Render's free tier is the classic example: a free web service spins down after 15 minutes without inbound traffic and takes about a minute to wake up. For a website demo that is fine. For a long-polling bot it is downtime, because a bot receives no inbound web traffic — it makes outbound requests to Telegram. Sleep is honest — Render documents it plainly — but it means a polling bot on Render free is not a 24/7 bot.

Trap 2: expiry. The free tier has a time limit. Heroku's free tier ended entirely in November 2022, and the platforms that replaced it mostly run on trial credits now — Railway and Fly.io moved to trial and usage-based models in 2026. Render's free Postgres database is also deleted after a set period: Render's own free-tier documentation states 30 days, while some independent roundups report 90 days. Either way, treat any free database as temporary and keep your own backups.

Trap 3: caps. The free plan limits something you will eventually need — one project only, a few hours of runtime, or a small memory limit. Netrun's free plan, for example, gives a bot 3 hours of running time (only the time it actually runs counts), and one project per account. The bot stops when the hours run out, though your code, settings, and token are kept. These caps are fine for testing. They break the week your bot gets popular.

Free Telegram bot hosting compared

Here is how the realistic free options stack up as of November 2026. Prices and limits change, so recheck the provider's own page before you commit a live bot to it.

OptionReally 24/7?Card needed?The catch
Kerit Cloud freeYes — no sleep modeNo256 MB RAM, shared MySQL, one small bot per server
FadeHost freeYes — no sleep timerNo (verified email only)Newer service, smaller community
Netrun freeOnly 3 hours, then it stopsNo24/7 needs Pro, earned by inviting friends or paid
Google Apps Script (webhook)Yes — serverlessNoWebhook-only, simple bots; Google quotas apply
OneStepKit freeYes for webhooksNot statedWebhook-based bots only; inactive bots removed after 7 days
Render freeNo — sleeps after 15 min idleNo750 free hours a month, but sleep breaks long polling
Cheap VPSYesYesAbout 5 to 7 dollars a month, and you manage the server

A typical long-polling bot idles around 70 MB of memory, so it fits inside the smallest free plans. The problem was never size. It was sleep.

Step 1: Create your bot with BotFather

Every method below starts here, and it takes about two minutes. Open Telegram and search for @BotFather — check for the verified blue tick, because copycat bots exist. Send /start, then /newbot, give your bot a display name, then a username that ends in bot — for example, deals_alert_bot. BotFather replies with a long token string. That token is the password to your bot: anyone who has it controls the bot.

Store the token in an environment variable (for example, BOT_TOKEN) — never paste it directly into code you might share or upload to a public repository. If it ever leaks, send /revoke to BotFather to get a fresh one. One Telegram account can create up to 20 bots through BotFather, so you can run separate bots for separate jobs. Never hand your token to a random bot or website that promises free hosting in exchange for it, and add your config file to gitignore before your first commit.

Method 1: Host it on a free always-on host

If your bot uses long polling — the default in most tutorials — you need a host whose free plan never sleeps. Kerit Cloud's free plan is the clearest example verified in November 2026: 256 MB of RAM, 30 percent of an AMD EPYC core, 2 GB of persistent NVMe storage, a shared MySQL database, automatic restarts, no sleep mode, and no card required. Its Starter plan is 99 rupees a month when you outgrow the free tier.

How it works: write your bot in Python (aiogram or python-telegram-bot) or Node.js (telegraf or grammY), reading the token from the BOT_TOKEN environment variable. Create a free server on the host, choose your runtime, and upload your bot file plus its requirements file — skip the virtual environment folder and node modules, the host installs dependencies itself. Add BOT_TOKEN as an environment variable in the host's panel, set the start command (for example, python -u bot.py), press start, and message your bot — the reply should arrive almost instantly.

Two things to get right: stop any copy of the bot running on your own computer first, because two processes polling the same token produce a 409 Conflict error and updates get split between them. And keep your data in the included database rather than in memory, because a restart wipes in-memory state. Add a global error handler so one malformed message cannot take the bot down. Respect Telegram's limits too: about one message per second per chat, 20 messages per minute per group, and about 30 broadcast messages per second overall — go over that and you will start receiving 429 errors.

Method 2: Run it serverless with Google Apps Script

If you do not want a server at all, the webhook route runs your bot on Google's free Apps Script platform. This is the method Indonesian guides recommend most, and it works anywhere — you write a small JavaScript function, deploy it as a web app, and register its URL as your bot's webhook.

How it works: create a Google Spreadsheet, open Extensions, then Apps Script, and paste in a small script that reads incoming Telegram updates and replies with the sendMessage method. Deploy it as a web app with access set to Anyone, and copy the web app URL. Then register the webhook by opening this address in your browser, with your token and URL filled in: https://api.telegram.org/botYOUR_TOKEN/setWebhook?url=YOUR_WEB_APP_URL. If the browser shows a response with ok set to true, your bot is live — Telegram now pushes every message to your script, which only runs when a message arrives, so it stays "online" 24 hours a day without a server running anywhere.

The trade-off is capability: Apps Script suits simple reply bots, reminders, and notification bots. Heavy media processing, long-running jobs, and large databases belong on a real host. Google also applies its own quotas, so a bot that suddenly goes viral can hit execution limits.

Method 3: Let GetMyChat host it for you

Free hosting is genuinely workable for a personal bot or a small community bot. It stops being the right answer when the bot matters: when it takes orders, answers customers, forwards channel posts, or runs a business workflow. Then the costs are not the server bill — they are the weekends spent fixing a host that changed its free tier, the messages missed during a sleep cycle, and the token you pasted somewhere you should not have.

That is the part GetMyChat takes over. Telegram bot hosting and automation is one of our core services: we host your bot, keep it online 24/7, and wire it into the automations around it — Telegram-to-WhatsApp forwarding, Telegram channel auto-forwarding, Telegram-to-Discord, Telegram-to-X posting, and Instagram comment-to-DM automation through Meta's official API. Message us on WhatsApp +91 93184 19758, Instagram @getmychat.in, or X @getmychat and describe what your bot should do — we set it up, test it live with you, and keep it running.

Troubleshooting: why is my bot not replying?

The bot does nothing at all. The most common cause is that the bot is not connected to any running code yet — a token alone does nothing. Check that your host shows the process running, and that the token in the environment variable matches the one BotFather gave you. If you changed the webhook, long polling stops working: Telegram only delivers updates one way at a time.

409 Conflict: terminated by other getUpdates request. Two copies of your bot are polling the same token — usually one on your laptop and one on the host. Stop the local copy. Only one process may poll a token.

The bot replies, then goes silent for hours. On a sleeping free tier, that is the sleep cycle: the process stopped after 15 idle minutes and only woke on the next web request — which a polling bot never receives. Move to a no-sleep host or switch to webhooks.

429 errors / FloodWait. You are sending too fast. Telegram allows about one message per second in a single chat and about 30 broadcast messages per second overall. Slow down, spread bulk messages over hours, and never retry instantly in a loop — that makes the wait longer.

FAQ

Can I host a Telegram bot for free 24/7?

Yes. A bot-specific free host with no sleep mode, or a serverless webhook setup like Google Apps Script, keeps a bot online around the clock at zero cost. General-purpose free tiers like Render sleep after 15 minutes idle, so they are not truly 24/7 for polling bots.

Why does my Telegram bot keep going offline?

Almost always because the host sleeps. Free tiers on general platforms stop your process after a period without web traffic. A polling bot makes outbound requests, so nothing ever wakes it back up. Use a host with no sleep mode, switch to webhooks, or use a managed host.

Do I need a VPS to run a Telegram bot 24/7?

No. A VPS is one option, at roughly 5 to 7 dollars a month, but free no-sleep hosts and serverless webhook platforms can keep a small bot online without one. You need a VPS (or a managed service) when the bot outgrows free limits or needs guaranteed uptime.

What is the difference between long polling and webhook?

Long polling means your program runs non-stop and asks Telegram for new messages — it needs an always-on host. A webhook means Telegram pushes each message to a URL you registered — your code only runs when a message arrives, so it can live on serverless platforms. You cannot use both at the same time.

The bottom line

Free 24/7 Telegram bot hosting is real, but only on hosts designed for it: a no-sleep bot host for polling bots, or a serverless webhook setup for simple bots. The famous free tiers sleep, expire, or cap you — and the sleep is the trap, because a bot that misses messages while it sleeps is not automation, it is a part-time bot. Pick the method that matches your bot, keep your token secret, and when the bot starts mattering to your business, let someone run it for you.

Related guides:

#telegram-bot#bot-hosting#telegram-automation#free-hosting#getmychat

Related guides