How to host a Telegram bot for free
Get a token from BotFather and run a Telegram bot in Python or Node.js in a few minutes.
1. Create the bot with BotFather
- Open Telegram and search for @BotFather.
- Send
/newbot, choose a name and a username that ends withbot. - BotFather sends you a token like
123456:ABC.... Copy it and keep it secret.
2. Run it on FreeBot
- Sign in and click Get my free bot.
- Pick Telegram bot (Python) or Telegram bot (Node.js).
- Open Settings and paste the token into
TELEGRAM_TOKENunder Variables. Save. - Press Start and wait until the logs show that the bot is running.
3. Test it
Open your bot in Telegram and send /start. The ready bot answers and repeats your messages. Now change the code in Files to make it your own, then press Restart.
Tips
- Your bot uses long polling, so you do not need a website or a webhook.
- Add more packages to
requirements.txt(Python) orpackage.json(Node.js). They install at the next start.