While a bot runs on your computer, it is alive only as long as the PC is on and the internet works. That is not good enough for a real bot — you need a server that is always on. The simplest and cheapest option is a small VPS. Let’s walk through the whole path: from choosing a plan to auto-starting the bot.
- Choose a plan — for most bots VPS Bot is enough — 512 MB RAM, 10 GB NVMe for 59 UAH/mo. If your bot uses a database or media, take VPS Nano or Start.
- Get your access details — after payment your dashboard shows the IP, root password and the SSH command to connect.
- Connect via SSH — run ssh root@YOUR_IP -p PORT in your terminal and log in with the password from the dashboard.
- Install the runtime — for Python: apt update && apt install -y python3-pip, then pip install aiogram (or pyTelegramBotAPI). For Node.js: install Node and npm install telegraf.
- Upload your bot code — transfer files via git clone or scp and set the token you got from @BotFather.
- Run it as a service — set the bot up as a systemd service (or pm2 for Node.js) — then it runs in the background 24/7 and auto-starts after a server reboot.
How much resource a bot needs
A Telegram bot is a light workload: it talks to the Telegram API and doesn’t handle heavy inbound traffic. A simple bot is fine with 512 MB of RAM. Memory matters when the bot works with a database, processes images/video, or has thousands of active users — then take 1–2 GB or more.
- Simple bot (commands, no DB): 512 MB RAM — VPS Bot plan
- Bot with a database and broadcasts: 1 GB RAM — VPS Nano plan
- Heavy (media, AI, thousands of users): 2–4 GB RAM — VPS Start/Pro
Webhook or long polling
Long polling is the simplest way: the bot itself asks Telegram for new messages, nothing extra to configure, works right away. A webhook is when Telegram pushes updates to your server; it is more efficient under load but needs HTTPS (a free SSL is easy to add). Polling is enough to start; switch to a webhook later if needed.
Will the bot work when my computer is off?
Yes. It lives on the server and runs around the clock regardless of your PC. After a server reboot it starts on its own if set up as a systemd service or via pm2.
Which plan is enough?
For most bots — VPS Bot (512 MB RAM, 10 GB NVMe, 59 UAH/mo). For bots with a database or media take VPS Nano or Start.
Which language should I write the bot in?
Any: Python (aiogram, pyTelegramBotAPI), Node.js (Telegraf, grammY), PHP, Go. You have root access — install anything.
Host your bot on CloudAxis
An affordable VPS for a Telegram bot — 24/7 operation from 59 UAH per month.
Bot hosting