This interactive demo was created free with Storylane in 2 minutes. Create your own demo
This interactive demo was created free with Storylane in 2 minutes. Create your own demo
Start free
All Tutorials /Replit

How to Host a Telegram Bot on Replit

Updated on:
May 4, 2026
By:
Madhav Bhandari
Use this interactive demo to learn how to host a Telegram bot on Replit.

‍

This tutorial shows how to keep your Telegram bot running in Replit using the Shell, so it stays active without needing the official Deployments feature.

Note:

  • You need a Replit account and a working Telegram bot project. If you haven't built one yet, see How to Create a Telegram Bot on Replit first.
  • Your bot token should be saved as a Secret with the key TOKEN. Add it under the Secrets tab if you haven't already.
  • This method keeps your bot alive within an active Replit session. For permanent 24/7 uptime, see How to Deploy a Telegram Bot on Replit instead.
  1. Sign in at replit.com and open your Telegram bot project from the dashboard.
  2. In your workspace, click New Tab and select Shell tab to open a terminal session.
  3. In the Shell, run your bot using the command python bot/main.py. Your bot starts and begins polling for messages.
  4. To keep the bot running after detaching from the session, start a new screen by typing screen -S [botname] and pressing Enter, then run python bot/main.py inside it.
  5. Detach from the screen session by pressing Ctrl+A, then D. Your bot continues running in the background.
  6. Open Telegram and send your bot a test message - for example, /start or /help - to confirm it's active and responding.

📌 Why this matters

You need your Telegram bot actively listening for messages to provide real-time responses to users, whether that's handling customer support queries, processing commands, or automating tasks. Running your bot through the Shell gives you immediate testing capabilities and quick iteration cycles during development. Using screen sessions transforms a basic hosting approach into a lightweight alternative to formal deployment services. This method bridges the gap between local development and production hosting, letting you maintain a live bot for testing or small-scale usage without upgrading your account.

Your product deserves an interactive demo
Start free
Similar Articles
Replit

How to Delete a Replit Account

Madhav Bhandari
Director of Marketing @ Storylane
Replit

How to Delete a Replit Account

Madhav Bhandari
Director of Marketing @ Storylane
Replit

How to Use Supabase in Replit with Node.js

Madhav Bhandari
Director of Marketing @ Storylane
No items found.
Platform
Interactive Demos
Sandbox Demos
Buyer Hub
RepX
Integrations
Solutions
Product Marketers
Growth & Demand Gen
Sales Reps & AEs
Presales & SEs
Customer Success
Product Managers
Customers
Demo Showcase
Customer Stories
Finer Demos Club
Features
Demo Signals
Personalization
Deal Intelligence
Resources
Blog
The Plot
Tutorials
Events & webinars
Help Docs
What’s New
Demo Dundies
Company
Careers
Pricing
Partners
Contact
Trust Center
Backed by
Chrome Extension Icon
Chrome extension
Download
Desktop app
Download
Built in San Francisco Bay Area - ©2026 Storylane
Privacy PolicyTerms & Conditions
X Corp (formerly Twitter)LinkedIn
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it