August 20, 2026 · The Minely team
Hosting a Discord bot for free (or close)
Bots fail in boring, predictable ways, and almost all of them trace back to a handful of habits nobody taught you. A small VPS, a Raspberry Pi, or a container platform all work; the bot itself is a few hundred MB of RAM. This is the short, honest guide to getting it right the first time.
What this topic actually is
A small VPS, a Raspberry Pi, or a container platform all work; the bot itself is a few hundred MB of RAM. The real requirements: env-based config, auto-restart, and logs you can read.
How it works under the hood
The pattern is habit, not library features: minimal intents, env-based config, fast interaction replies, and logs you can actually read. Do those four and the library you chose barely matters.
The prompt that builds it
You do not have to write this yourself. A precise description is enough:
a systemd unit that restarts the bot on crash
Name the commands, the permissions, and the exact messages players see. Precision here is what makes the first build land close.
Building it in the right order
- Set up the project with env config and minimal intents.
- Build one command with the full pattern (reply discipline, error handling).
- Register and test on one guild for instant iteration.
- Add the rest of the commands behind the same pattern.
The details that matter in production
In production, the first thing you learn is that the happy path is the easy half. The edges are where the work lives: restarts, protection interactions, full inventories, and players who treat every system like an exploit puzzle. Build for those from day one and the launch weekend is quiet instead of a fire drill.
Storage and cleanup deserve special attention. Write state as it changes rather than on shutdown, clear per-player state on quit and on world change, and make every admin-facing action leave an audit line. The first time something goes wrong, those records are the difference between a two-minute review and an evening of guessing.
Finally, test like a hostile user. Spam-click every GUI, rejoin mid-action, try the command with no permission and with every permission, and run it while the server is under load. The bugs that survive that pass are the ones worth shipping.
Tuning it after the first build
Review logs weekly for the first month; the habits that hold are the ones you verify. Everything else in this guide is maintenance-free once it is right.
Tips that save you a rebuild
- Answer or defer every interaction within three seconds.
- Register per guild while developing; global sync takes an hour to propagate.
- Log errors with command and user context, always.
- Keep tokens in env from the first commit, not the first incident.
Questions people ask
Which library does this apply to?
The habits apply to discord.js, discord.py, discordrb, and everything else equally.
What is the most common failure?
A missing privileged intent — the bot connects and sees nothing, with no error.
How do I test safely?
A private test guild with instant command registration and verbose logs.
If you can describe it, you can ship it. Take the prompt from this guide, tweak one detail, and build your version tonight.
