We've got a new update. We now offer our own Web Console. Open the console and type ssh root@your-server-ip to reach any server you own, right from your browser. No SSH app needed.
A Telegram bot gets its messages in one of two ways, and the choice decides what your server needs. Long polling needs nothing open. A webhook needs HTTPS on one of four ports. Here is how to pick and how to set it up.
Prices are one-month prices; a 12-month term takes 50% off.
or $2.88/mo on a 12-month term (−50%)
Our cheapest size. Plenty for a command bot, a small database and logs.
Configure and orderor $4.25/mo on a 12-month term (−50%)
Room for webhooks behind a reverse proxy, PostgreSQL and more than one bot.
Configure and order| Long polling (getUpdates) | Webhook (setWebhook) | |
|---|---|---|
| How it works | Your bot asks Telegram for new updates in a loop | Telegram sends each update to an HTTPS URL on your server |
| Open ports | None, only outbound | HTTPS on 443, 80, 88 or 8443 |
| Domain and certificate | Not needed | An HTTPS URL; a self-signed certificate must be uploaded to Telegram |
| Best for | Simple bots and testing | Busy bots and anything already behind a web server |
| Watch out for | It does not work while a webhook is set. Track the offset to avoid duplicate updates | A broken certificate or proxy means updates stop arriving |
Facts from the Telegram Bot API documentation, read 19 October 2026.
Polling needs only this unit file. For a webhook, put a web server such as Nginx in front with a certificate and proxy the path to your bot.
sudo adduser --disabled-password --gecos '' tgbot
# copy your bot to /home/tgbot/app and install its dependencies as that user[Unit]
Description=Telegram bot
After=network-online.target
Wants=network-online.target
[Service]
User=tgbot
WorkingDirectory=/home/tgbot/app
EnvironmentFile=/home/tgbot/app/.env # holds BOT_TOKEN, readable only by tgbot
ExecStart=/usr/bin/python3 bot.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.targetchmod 600 /home/tgbot/app/.env
sudo systemctl daemon-reload
sudo systemctl enable --now telegram-bot
journalctl -u telegram-bot -fsudo ufw allow 22/tcp
sudo ufw allow 443/tcp # one of 443, 80, 88 or 8443Run it on a VPS as a systemd service with Restart=always. The process starts at boot, restarts after a crash and keeps running when you log out. The setup above includes the unit file.
Use long polling for simple bots and testing, because it needs no open ports. Use a webhook for busy bots or when you already run a web server. You cannot use both at once.
The Bot API documentation lists 443, 80, 88 and 8443, over HTTPS.
Not for polling. For a webhook you need an HTTPS URL; a self-signed certificate works if you upload it to Telegram, but a normal certificate for a domain is easier. See buy domain names.
Most bots fit in 1 to 2 GB RAM. Our cheapest VPS has 1 vCPU, 2 GB and 40 GB NVMe for $5.76 a month. For several bots and a database, the 2 vCPU, 4 GB size ($8.50 in Romania) leaves room.
Yes. Generate a login and pay with Bitcoin, Monero, USDT or another supported coin, with no name, ID or phone. See no-KYC VPS hosting.
Checked 19 October 2026. Chain sizes and software requirements change, so confirm against the source before you order.
Pick a size, pay in crypto, log in as root. No ID, no card.