Bots and messaging

Telegram bot hosting on a VPS

A Telegram bot has to be online whenever someone writes to it. A laptop sleeps and a home connection drops, so most people move the bot to a small virtual server. With NodeRings you compare live plans from independent providers, pick one, and get a server with root access that keeps your bot running 24/7.

Most bots are light. A single Python or Node bot that talks to Telegram uses very little memory, so a 1 vCPU, 1 GB plan is a sensible start.

Recommended start: 1 vCPU, 1 GB RAM · from $5.00/mo on live plans

Live marketplace offers

Plans for a Telegram bot

These are live offers that meet the size you pick. Prices and regions come from the providers and change when they do.

What are you running?

A polling bot sits idle most of the time. One gigabyte leaves room for the system, your bot and updates.

Enzonix logo
Enzonix

Shared Compute - General Compute

$5.00/mo

1 vCPU · 1 GB · 20 GB

Choose location

Ashburn, United States

1 provider

Why run your Telegram bot here

  • Compare before you commit

    See live prices, sizes and regions from several independent providers in one list, then deploy on the one you choose.

  • Root access

    Install Python, Node or anything else. Your bot, your token and your logs stay on your server.

  • Pay monthly or by the hour

    Pick a fixed monthly plan for a bot that runs for good, or an hourly plan to test an idea and delete it when you are done.

  • A server you can automate

    Create it from the console, from Terraform or OpenTofu, or by asking an AI assistant over MCP.

  • Pick a region near your users

    Plans list their city and country, so you can choose where the bot runs.

  • No new platform to learn

    A bot on a VPS is a normal process. If you move away, you take it with you.

How big a server does a Telegram bot need?

Start small, then watch memory. These are starting points, not guarantees.

How big a server does a Telegram bot need?
WorkloadStart withNote
One polling bot, commands and replies1 vCPU, 1 GBThe bot waits on the network almost all the time.
Webhook bot behind HTTPS1 vCPU, 1 GBYou need a domain name and a certificate. Caddy or Nginx can do both.
Bot that calls a hosted AI API1 vCPU, 2 GBYour server forwards text. The model runs elsewhere.
Bot that processes images or audio2 vCPU, 4 GBMedia libraries and temporary files need memory and disk.
Several bots and a small database2 vCPU, 4 GBGive each bot its own service and its own settings file.

Numbers depend on your code and traffic. Check memory with htop after a day of real use.

Polling or webhook?

A polling bot asks Telegram for new messages in a loop. It needs no open port and no domain, so it is the easiest way to start.

A webhook bot waits for Telegram to call your server over HTTPS. It needs a domain name and a certificate, and it copes better when many people write at once. The quickstart below uses polling. You can switch to a webhook later without changing your plan.

Quickstart: run a Telegram bot with Python

About ten minutes. You need a Telegram account and an SSH key.

  1. Create the bot in Telegram

    Open a chat with BotFather, send /newbot, and follow the prompts. BotFather replies with a token. Treat it like a password.

  2. Choose a plan and create the server

    In the plans section, choose Deploy on a plan that fits. Pick Ubuntu 24.04, add your SSH key, and confirm. A default payment method is required.

  3. Connect and install Python tools

    Log in as root, then create a system user and a virtual environment for the bot.

    Install
    ssh root@YOUR_SERVER_IP
    apt update && apt install -y python3-venv
    useradd --system --create-home --home-dir /opt/telegram-bot --shell /usr/sbin/nologin bot
    sudo -u bot python3 -m venv /opt/telegram-bot/.venv
    sudo -u bot /opt/telegram-bot/.venv/bin/pip install python-telegram-bot==22.8
  4. Add the bot code

    Create /opt/telegram-bot/bot.py with the code below, and make the bot user own it.

    bot.py
    import os
    from telegram import Update
    from telegram.ext import Application, CommandHandler, ContextTypes
    
    
    async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
        await update.message.reply_text("Hello from my VPS.")
    
    
    def main() -> None:
        app = Application.builder().token(os.environ["BOT_TOKEN"]).build()
        app.add_handler(CommandHandler("start", start))
        app.run_polling()
    
    
    if __name__ == "__main__":
        main()
    Save and own the file
    nano /opt/telegram-bot/bot.py
    chown bot:bot /opt/telegram-bot/bot.py
  5. Store the token outside the code

    Put the token in a file that only root can read, as one line: BOT_TOKEN= followed by your token. systemd reads it and passes it to the bot.

    Token file
    nano /etc/telegram-bot.env
    chmod 600 /etc/telegram-bot.env
  6. Keep it running with systemd

    Save the unit below as /etc/systemd/system/telegram-bot.service, then enable it and follow the log.

    telegram-bot.service
    [Unit]
    Description=Telegram bot
    After=network-online.target
    Wants=network-online.target
    
    [Service]
    User=bot
    WorkingDirectory=/opt/telegram-bot
    EnvironmentFile=/etc/telegram-bot.env
    ExecStart=/opt/telegram-bot/.venv/bin/python bot.py
    Restart=always
    RestartSec=5
    
    [Install]
    WantedBy=multi-user.target
    Start the service
    systemctl daemon-reload
    systemctl enable --now telegram-bot
    journalctl -u telegram-bot -f
  7. Test it

    Send /start to your bot in Telegram. It should answer "Hello from my VPS." The service restarts after a crash and starts again after a reboot.

Good fit and not a fit

Ideal for

  • Command bots, notification bots and group moderation bots
  • Small AI-assisted bots that call a hosted model
  • Several hobby or client bots on one server
  • Bots you want to run in a region you choose

Not ideal for

  • Running a model locally on a 1 GB plan (see the AI and LLM page)
  • Anything that breaks Telegram's rules or your provider's acceptable use policy
  • Promising uptime that one server cannot back. Run two servers if downtime is costly

Acceptable use is covered in section 6 of the Terms of Service. Read the Terms of Service

Questions

How much does it cost to host a Telegram bot?

A small bot runs on the smallest plan in the list. The plans section shows the live price from each provider, monthly and hourly where offered.

Do I need a domain name?

Not for a polling bot. A webhook bot needs a domain and an HTTPS certificate because Telegram only calls secure addresses.

Python or Node.js?

Either works. python-telegram-bot and aiogram are popular for Python, and grammY and Telegraf for Node. The server only needs the runtime you pick.

Does Telegram limit how fast my bot can send messages?

Yes. Telegram documents limits on how fast a bot can send, per chat and overall. Add a small queue if you broadcast to many people, and check Telegram's bot FAQ for the current figures.

How do I keep my bot token safe?

Keep it out of your code and out of git. Store it in a root-only file as in the quickstart. If it leaks, send /revoke to BotFather and update the file.

Can I run more than one bot on one server?

Yes. Give each bot its own folder, its own service and its own settings file. Watch memory as you add bots.

What happens if my server restarts?

The systemd service starts the bot again at boot, and restarts it five seconds after a crash.

Related use cases

Put your bot online today

Pick a plan, deploy, and send your first message.

Telegram Bot Hosting on a VPS · NodeRings