⚡ Tutorials · Hostra Cloud 2026

Deploy Telethon & Pyrogram Userbot 24/7

Keep your Telegram userbot online nonstop without losing your .session file

Direct SSH & Web CLI ssh [email protected] (port 22)
Managed Databases PostgreSQL · MySQL · Mongo · Redis
Automatic Free SSL Wildcard SSL + Custom Domains
Local UZS Billing Uzcard · Humo · Click · Payme

⚡ Overview & Key Features

Telethon and Pyrogram require interactive login on first run and a persistent disk to retain .session files. Hostra Cloud's Web Terminal/SSH and persistent NVMe storage make it effortless.

💻 Quickstart Code Sample

python3 -m venv venv && source venv/bin/activate
pip install telethon cryptg
python3 userbot.py   # login once, then Ctrl+C
chmod 600 *.session
pm2 start userbot.py --interpreter ./venv/bin/python3 --name my-userbot

🛠️ Step-by-Step Setup

1

Get API Keys

Fetch API_ID and API_HASH from my.telegram.org.

2

Authorize Once

Run python3 userbot.py in terminal to generate your .session file.

3

Run 24/7 via PM2

Daemonize under PM2 so it runs indefinitely.

❓ Frequently Asked Questions

Will my .session file survive container restarts?
Yes, your container storage is completely persistent.

🔗 Related Services & Tutorials

Launch Your Bot or Website on Hostra Cloud Today

Direct SSH (ssh [email protected]), in-browser terminal, PostgreSQL/MySQL/MongoDB/Redis, automatic Wildcard SSL, and instant local billing.

🚀 Get Started Free