Telegram bot VPS with HTTPS, a static IP and 24/7 uptime
A Telegram bot lives or dies by whether setWebhook can reach a public HTTPS URL, or whether your long-polling loop stays alive. You get both: an open port 443, Let's Encrypt in one command and systemd built in.
- Static IPv4 included
- Root SSH access
- Pay with crypto, no KYC
Webhook or long polling: different hosting needs
Telegram bots either sit in a getUpdates loop or expose a public HTTPS endpoint. Both work properly here.
Webhook: Telegram pushes to you
Telegram POSTs each update to an HTTPS endpoint you register with setWebhook. It needs a valid TLS certificate on port 443, 80, 88 or 8443, a static IP and an always-on server. The fastest option, with no idle polling.
- Static public IP and open port 443
- Free Let's Encrypt certificate
- Nginx or Caddy one apt install away
- setWebhook is a one-liner after deploy
Long polling: your bot pulls from Telegram
getUpdates keeps a request open until Telegram has something to send. No inbound port or certificate needed, but the process must run 24/7, and duplicate handlers drop updates.
- No TLS setup, start with one command
- Ideal while prototyping
- Works behind an outbound-only firewall
- systemd keeps the poll loop alive
Telegram won't talk to a plain HTTP endpoint
setWebhook rejects http://, self-signed certificates with unknown roots and any port outside 443, 80, 88 or 8443. At home that means dynamic DNS and port forwarding. On our VPS, one certbot command gives you a valid Let's Encrypt certificate that renews itself.
- Free Let's Encrypt certificates
- Static IPv4
- Nginx and Caddy ready
- HTTP/2 and TLS 1.3
# 1. TLS certificate (free, auto-renew)
$ sudo certbot --nginx -d bot.example.com
# 2. Register the webhook with Telegram
$ curl -F "url=https://bot.example.com/tg/<secret>" \
https://api.telegram.org/bot$TOKEN/setWebhook
{"ok":true,"result":true,"description":"Webhook was set"}
# 3. Start the bot under systemd
$ sudo systemctl enable --now mybot.servicepython-telegram-bot, aiogram and grammY all run natively
Root SSH, pick your stack, add a systemd unit, done.
- python-telegram-botThe reference Python framework. ConversationHandler, JobQueue and PicklePersistence with one pip install, ready for systemd.v21, asyncio
- aiogramAsync-first, with FSM state, dependency injection and clean routers. Pairs well with uvicorn and FastAPI in webhook mode.3.x, fully async
- Telegraf / grammYNode bots run behind pm2 in seconds. TypeScript, middleware and session stores. grammY's runner scales one bot across CPU cores.Node.js 20, 22
- Telethon / PyrogramFull MTProto access for userbot automation, channel scraping and multi-account setups, with persistent sessions and floodwait handling.MTProto userbots
The bots people run here most
E-commerce and order bots
Payment links, order lookup, live shipping status. Fast webhook responses keep checkout snappy.
Alerts and notifications
Price alerts, monitoring pings, deploy notifications. A dedicated VPS means no cold starts and no delivery gaps.
Community and group admin
Anti-spam, captcha gates and welcome flows across dozens of groups, with Redis rate limits on the same server.
MTProto userbot automation
Telethon or Pyrogram jobs on a static IP. Safer than a home network and less likely to be flagged for constant re-logins.
One bot today, ten on the same VPS tomorrow
Add bots as separate systemd units behind one Nginx or Caddy, with one Redis for sessions and rate limits.
- Reverse proxyNginx or Caddy on port 443 with SNI routing per subdomain. One certificate per bot via certbot's -d flag.
- Bot processesOne systemd unit per bot with Restart=always, a dedicated user and an environment file for tokens. Logs go to journalctl.
- Shared stateRedis for FSM state and dedup, Postgres for orders and users. Both idle at under 100 MB.
Telegram bot VPS plans
Linux VPS plans with root access. Basic runs 3 to 5 modest bots; Standard handles ten with Redis and Postgres.
Questions before you point setWebhook at us
Still unsure? Our team answers on live chat and in tickets.
Do I actually need a VPS for a Telegram bot, or can I run it on my laptop?
Should I use webhook or long-polling mode?
How do I get HTTPS on my VPS for setWebhook?
Can I run python-telegram-bot and aiogram side by side?
How does auto-restart work when my bot crashes?
What are Telegram's actual limits I should design for?
Can I run a Telethon or Pyrogram userbot on the same VPS?
Linux or Windows?
How fast can I deploy?
Related pages
- Windows RDPWindows Server 2019, 2022 and 2025 with full admin access
- Linux VPSUbuntu, Debian, AlmaLinux and Rocky with full root access
- Discord Bot VPSdiscord.js and discord.py bots, online 24/7
- Web Scraping VPSSelenium, Playwright and Scrapy jobs
- SEO VPSScrapebox, GSA and RankerX on Windows
- Antidetect VPSAdsPower, Multilogin and Octo Browser
- Streaming RDPOBS, vMix and XSplit streams on a server
Install guides
Give your Telegram bot a real address on the internet.
Static IP, valid TLS certificate and a systemd unit that survives every reboot.