NetrunHome

What it costs

How much memory and CPU does a Telegram bot need

· 5 min read

In short

An ordinary Telegram bot is fine with 1 GB of memory and half a CPU core — exactly what the Pro plan gives for $4.99 a month. A bot spends almost all its time waiting for messages and creates no load; memory goes on libraries and the CPU is only busy at the moment of a reply. More is needed only if the bot processes images or video, keeps a heavy database, or computes things itself instead of calling an external service.

When picking a server for a bot it is easy to buy too much: cloud plans are described in cores and gigabytes, and nowhere does it say how much of that a bot answering a hundred people a day actually needs. Usually very little. A bot spends most of its life waiting for a message, and while it waits it uses neither CPU nor disk.

Let us go through it in order: what a bot needs memory for, when it runs short of CPU, and how to tell a real ceiling from a bug in your code.

  1. Understand where the memory goes#

    Most of the memory is taken not by your code but by the libraries it pulls in. A bot on aiogram or Telegraf with a couple of dozen commands takes tens of megabytes. It grows sharply only when heavy packages arrive: image processing, table-based analytics, a browser for scraping. Without those, a bot needs very little.

  2. Do not confuse load with being always on#

    A bot is busy around the clock but not loaded around the clock: between messages it sits idle on a wait and consumes almost nothing. The CPU is needed in bursts, at the moment of a reply. So “the bot runs 24 hours” and “the bot needs a powerful server” are quite different claims, and the second almost never follows from the first.

  3. Compare that with what the plan gives#

    On the free plan a project gets 256 MB of memory, 0.25 of a CPU core and 2 GB of disk — enough for the bot to build, start and answer commands. On Pro ($4.99 a month) it is 1 GB of memory, 0.5 of a CPU core and 5 GB. A bot with an SQLite database, images, buttons and a couple of background jobs fits into that comfortably.

  4. Learn what running short looks like#

    Running out of memory always looks the same: the bot restarts out of nowhere and the logs stop mid-work with no meaningful error. Running out of CPU looks different — the bot replies, but with a delay that grows with the number of simultaneous messages. If the bot replies instantly and then goes silent forever, the cause is almost certainly in the code rather than in resources.

  5. Look at numbers, not at feelings#

    Your account shows how much memory and CPU the project really uses and how that changed over time. Before buying a bigger server, look at the chart: more often than not it shows the bot using a small fraction of what it has, while the slowness comes from a sluggish external service or a heavy database query.

  6. Move the heavy parts out#

    If the bot genuinely needs something heavy — speech recognition, text generation, video processing — calling an external API is almost always cheaper than keeping all of it on your own server. The bot goes back to modest resources, and you pay for the heavy part by actual use.

A bot rarely needs a big server; it needs a small one that is always on. Upload your bot to Netrun and look at what it really consumes — the first 3 days are free.

Common questions

How much RAM does a Telegram bot need?

An ordinary bot on aiogram, python-telegram-bot or Telegraf needs tens of megabytes, so the 1 GB on the Pro plan is plenty. More is only required by heavy libraries: image processing, table analytics, an embedded browser.

Are free-plan resources enough for a bot?

For testing, yes. On the free plan a project gets 256 MB of memory, 0.25 of a CPU core and 2 GB of disk, and an ordinary bot fits. The free plan's limit is not resources but time: a bot runs for 3 days, after which it needs Pro.

How many users can such a bot handle?

It depends not on how many subscribers you have but on how many write at the same time. A bot that replies with text and reads a database serves thousands of users a day without trouble: between messages it costs nothing. You are more likely to hit a ceiling on heavy operations than on user count.

How do I know the bot is out of memory?

The classic sign is the bot restarting by itself while the logs stop mid-work with no meaningful error. Slow replies, on the other hand, usually point to a sluggish external service or a heavy database query rather than to memory.

What if the resources really are not enough?

Start with the consumption chart in your account: it often turns out the bot uses a small share of what it has. If the ceiling is real, moving the heavy part to an external API costs less than keeping it next to the bot.

Does a bot need a dedicated server?

No. A dedicated server makes sense when a project genuinely eats a whole machine, and a bot almost always uses a small part of one. Paying for a small always-on resource — $4.99 a month — beats paying for a machine that sits idle.

How do I know my app is doing fine?

The Monitoring tab shows what is happening with your app right now: how many requests are coming in, how fast it replies, and whether any replies were errors — and below that, processor, memory and disk load. Everything refreshes every minute. The Pro plan adds the whole day: whether the app ran without interruptions, which hour it went down and how fast it replied. Bots and background scripts get no incoming requests — nobody comes to them by link — so for them we only show uptime.

What is different about the Pro plan?

On the Pro plan your project runs around the clock: a website does not sleep and responds instantly, with no pause to wake up, while a bot or a background script keeps running with no 3-day limit. On top of that, Pro gives more memory, CPU and disk space, and a Pro website can use your own domains — as many as you need, each with HTTPS.

Do bots and background scripts sleep?

No, only websites sleep: a website wakes up by itself when someone opens it. A bot or a background script has nothing to wake it — nobody comes to them by link, they work on their own. That is why on the free plan they run for 3 days, and after that a bot needs the Pro plan to keep running around the clock.

What happens if my app crashes?

We watch over projects and restart them if they fail. If something goes wrong, you can see the status and logs in your account and you get a notification.

Get your own project online

Upload your code, answer a couple of questions and get a working link. There is a free plan

Try Netrun
All blog articles