Learning objectives
After reading this article you will be able to:
- Understand what makes up the monthly cost of a bot
- Estimate how much RAM and which extras your bot needs
- Compare running at home, a VPS and a hosting platform
A Discord bot is a program that keeps a permanent connection to the Discord Gateway and reacts to events. To answer, it has to stay on all the time, and that is what costs money: the machine the process runs on, not the code.
So the right question is not "how much does a bot cost?" but "how much does it cost to keep a process running, with the memory and data it uses?" The bill has only a few lines, and you can estimate each one before you sign up for anything.
What makes up the cost of a Discord bot?#
Five items explain almost all of the spending:
- Compute (RAM and CPU): where the process runs. This is the main item.
- Database: only if the bot stores state that has to last.
- File storage: images, audio or exports the bot creates or serves.
- Domain and certificate: only if the bot has a web dashboard.
- External services: AI, music, image or payment APIs your code calls.
The fifth item surprises people most. A bot that uses a pay-per-request API can spend more on calls than on hosting.
How much RAM does a bot need?#
RAM sets the size of the server you pay for. A simple command bot without a large cache usually runs in 256 to 512 MB. Usage rises for three reasons:
- Cache: discord.js and discord.py keep guilds, channels and members in memory. More servers means more cache.
- Privileged intents:
GUILD_MEMBERSandGUILD_PRESENCESincrease event volume and stored data. These two andMESSAGE_CONTENTmust be enabled in the portal and, from 100 servers on, approved by Discord. - Heavy libraries: image handling, audio and local AI use more than the bot code itself.
Measuring beats guessing: run the bot for a few hours, note the peak memory and add 30% to 50% headroom. The details are in how much RAM a Discord bot needs.
How much does it cost to run the bot at home?#
Running on your own computer looks free, but you pay for the electricity, and the bot is online only while the machine and the internet work. The math is simple:
kWh per month = watts × 24 × 30 ÷ 1000
Example: a 15 W mini PC on all month = 15 × 24 × 30 ÷ 1000 = 10.8 kWh
Cost = kWh × your utility's rateA laptop or desktop draws more power, so the cost rises. The bigger cost, though, is availability: a power cut, a Windows restart or a PC switched off takes the bot offline. See why in what happens to a bot when the PC is off.
VPS or a bot hosting platform?#
A VPS is a virtual machine with a fixed monthly price. The amount depends on the provider and changes over time, so check their pricing page before deciding. The catch is that you manage the operating system, security updates, firewall and the process that keeps the bot alive (for example, systemd or pm2). That time is a cost too.
A hosting platform gives you a ready environment: you upload the code and set the memory, with no server to configure. The choice depends on how much your time is worth and how much control you want.
Compare what each option includes before looking at price: automatic restart, logs, snapshots, databases and traffic limits vary a lot between providers.
What about no-cost options?#
There are third-party no-cost tiers and promotional credits. The pattern is similar: hour limits, suspension for inactivity, little RAM or rules that change without notice. They suit learning and testing. For a bot serving a community, downtime usually costs more in complaints than a monthly fee would. Typical limits are covered in limits of no-cost bot hosting.
What costs appear as the bot grows?#
- Sharding: Discord requires sharding from 2,500 servers, with at most 2,500 servers per shard. More shards mean more processes and more RAM.
- Verification: at 100 or more servers the bot must be verified, and privileged intents need approval.
- Database: SQLite on disk is fine to start, but it does not serve several instances. Moving to hosted PostgreSQL, MySQL, MongoDB or Redis adds a new line to the bill.
- Maintenance time: updating dependencies, reading logs and fixing outages.
As a rule of thumb, add up the RAM the bot uses at peak, add database and storage if any, and leave headroom to grow. That gives the minimum plan, and the differences between providers show up later, in the extras.
How to do this on Square Cloud#
On Square Cloud the bill has the same five lines, and several of them are already covered by the plan. Compute is the RAM you pick: Hobby costs R$12.49 per month for 1 GB, a pool shared across your applications. A bot counts as a background application with a 256 MB minimum, so a small bot uses only part of that pool and leaves room for another. If your measured peak plus headroom goes past 1 GB, the 2 GB Hobby costs R$24.99 per month.
The other items have a known answer before you sign up:
- Database: the app's disk persists across restarts and deploys, so SQLite works at the start. PostgreSQL, MySQL, MongoDB or Redis hosting starts on Standard, from R$44.99 per month, with an automatic daily snapshot.
- Files: Hobby includes 5 to 15 GB of Blob storage, with no egress fees.
- Web dashboard: every web application gets a
squareweb.appsubdomain with HTTPS; a custom domain comes with Standard and up. - External APIs: still billed by whoever provides them.
Every plan is paid and billed in reais, by Pix or card, with no lock-in and 20% off on annual billing. Unlimited traffic (fair-use policy), real-time logs and CPU and RAM metrics come with all of them, and the metrics tell you whether the RAM you picked is too much or too little. See what bots get on the Discord bot hosting page and compare plans on the pricing page.
Bot hosting
Keep your bot online 24/7 with automatic restarts
FAQs
Can I host a Discord bot at no cost?
Yes, with conditions: run it on your own PC while it stays on, or use a no-cost tier from a third party, which usually comes with limits, suspension or rule changes. For a bot that must stay online all the time, zero cost rarely holds up.
How much RAM does a Discord bot need?
A small bot without a large cache usually runs in 256 to 512 MB. Usage grows with the number of servers, the member and message cache, and heavy libraries such as image processing.
Do I need a database for my bot?
Only if it stores data that must survive restarts, such as economy, levels or per-server settings. For low volume, a SQLite file on the app's disk works; hosted databases make sense with lots of data or several instances.
Does the cost change as the bot grows?
Yes. Discord requires sharding from 2,500 servers, which means more processes and more memory, and from 100 servers the bot must be verified to keep growing.
More in Bots
See all 33 articles- How to host a Discord bot 24/7To keep a Discord bot online 24/7, run its process on an always-on machine with automatic restarts. Compare your PC, a VPS with pm2 or systemd, and bot hosting.
- Why your Discord bot keeps going offline (and how to fix it)A Discord bot goes offline when the process dies, the token is invalid, an intent is disabled or memory runs out. Learn to diagnose each cause and fix it.
- How to host a Telegram bot 24/7To keep a Telegram bot online 24/7, run its process on an always-on server using long polling or a webhook. See working code and the common errors.
- Free bot hosting: sleep, limits and hidden trade-offsFree bot hosting often puts your process to sleep, caps monthly hours or disappears. See the real limits of Render, Oracle Cloud, Glitch and Heroku.