NewCode CLOUD — 20% off your first month on all cloud VPSClaim

Telegram Bot VPS

Keep your Telegram bot online 24/7 on a small KVM VPS — location, sizing, polling vs webhooks, and a production setup with systemd or Docker.

Updated November 20263 min readUse Case

  • 24/7always online
  • Python · Nodeany language
  • HK · USlocations
  • $5/mostarting price

At a glance

  • A 1 Core / 2 GB VPS runs several bots comfortably.
  • Use a US VPS if the bot calls ChatGPT, Claude or Gemini; Hong Kong for Asian users.
  • Run the bot under systemd or Docker so it restarts after crashes and reboots.

Choosing a location

Telegram's Bot API works from both Hong Kong and the US. Choose by what else the bot talks to:

If your bot…Choose
calls ChatGPT, Claude or GeminiUS VPS (AI APIs are not available from Hong Kong)
serves Asian users or Hong Kong / China servicesHong Kong VPS
sends email notificationsUS VPS (port 25 open)

Polling or webhooks?

Long pollingWebhooks
SetupNo domain neededNeeds HTTPS on 443, 80, 88 or 8443
LatencyGoodBest
ScalingOne processBehind a reverse proxy, many workers
Best forSmall bots, quick startBusy bots, multiple bots on one server

Running a bot reliably with systemd

# /etc/systemd/system/mybot.service
[Unit]
Description=My Telegram bot
After=network-online.target

[Service]
User=bot
WorkingDirectory=/opt/mybot
ExecStart=/opt/mybot/venv/bin/python bot.py
EnvironmentFile=/opt/mybot/.env
Restart=always

[Install]
WantedBy=multi-user.target

Run systemctl enable --now mybot; check logs with journalctl -u mybot -f. Prefer containers? See Docker VPS.

How big a VPS does a bot need?

BotPlan
A few simple bots1 Core / 2 GB
Bot + database + AI calls2 Cores / 4 GB
Media processing, thousands of chats4 Cores / 8 GB

Security

  • Keep the bot token in an environment file, never in your code or Git.
  • Run the bot as a non-root user.
  • Validate webhook requests with a secret token.

Acceptable use

Spam bots, mass messaging and scraping that breaks Telegram's terms are not allowed and will lead to suspension.

Setting up a webhook with Nginx

server {
    listen 443 ssl;
    server_name bot.example.com;
    # ssl_certificate ... (issued with certbot)
    location /tg/<secret-path> {
        proxy_pass http://127.0.0.1:8080;
    }
}

Register it with setWebhook using your HTTPS URL and a secret_token, and check the header X-Telegram-Bot-Api-Secret-Token in your app.

What every Telegram Bot VPS plan includes

  • VPS: KVM virtualization with dedicated vCPU and RAM, deployed within seconds of payment.
  • VPS control panel: self-service reboot, OS reinstall and a VNC console, 24/7.
  • VPS guarantees: 3-day money-back guarantee and a 99.99% uptime SLA.
  • VPS billing: monthly, quarterly (save 5%), semi-annual (save 10%) or annual (save 20%); code CLOUD takes 20% off the first month.
  • Payments: VPS — USDT, Bitcoin, Alipay, PayPal, Stripe, credit cards and Cash App Pay.
  • No KYC and no ICP filing: sign up with an email address.
  • 24/7 support by ticket, usually answered within minutes.

How to order Telegram Bot VPS

  1. Test the network: ping the location’s test IP from your users’ location.
  2. Choose a plan and location, then an operating system or app image.
  3. Add IPv4 addresses or bandwidth if you need them, and apply code CLOUD for 20% off the first month.
  4. Pay — the VPS deploys within seconds.
  5. Log in over SSH or Remote Desktop with the details in your client area.

Before you buy: a quick checklist

  • Where are most of your users — and have you pinged our test IPs from there, at peak time?
  • Which operating system or image do you need, and is it available on the plan you picked?
  • How much RAM does your stack really use? Size for peaks, not averages.
  • Do you need extra IPv4 addresses or bandwidth? Add them at checkout.
  • Does your use comply with our Acceptable Use Policy and the laws of the server’s location?
  • Do you know the refund window — 3 days for VPS?

Recommended plans for Telegram Bot VPS

US VPS plans

All US VPS plans
PlanCPUMemoryStorageBandwidthPrice
1 Core / 2 GB1 Core2 GB60 GB SSD1 TB @ 1 Gbps Port$5/moOrder
2 Cores / 2 GB2 Cores2 GB60 GB SSD2 TB @ 1 Gbps Port$7/moOrder
2 Cores / 4 GB2 Cores4 GB60 GB SSD3 TB @ 1 Gbps Port$9/moOrder

Hong Kong VPS plans

All Hong Kong VPS plans
PlanCPUMemoryStorageBandwidthPrice
1 Core / 2 GB1 Core2 GB30 GB SSD2 Mbps CN2$5/moOrder
2 Cores / 2 GB2 Cores2 GB60 GB SSD4 Mbps CN2$7/moOrder
2 Cores / 4 GB2 Cores4 GB60 GB SSD6 Mbps CN2$9/moOrder
FAQ

Telegram Bot VPS FAQ

01Can I run several bots on one VPS?

Yes — give each its own systemd service or Docker container.

02Which language should I use?

Any: python-telegram-bot and aiogram (Python), grammY and Telegraf (Node.js) are all popular.