Discord
Free Discord bot hosting.
A gateway connection that stays open around the clock, on hardware you do not pay for. Pick the language you already write in.
Choose a runtime
Pick your language
All three are installed and tested. Each page covers the libraries, the deployment and what fits in 256 MB for that runtime specifically.
What a Discord bot actually needs from a host
Almost nothing, and that is the point. A Discord bot holds one outbound WebSocket to Discord's gateway and reacts to what arrives on it. There is no inbound traffic to route, no domain to point anywhere, and no port for anybody to reach, which is why a bot runs perfectly well on an allocation this small.
What it does need is to stay connected. A host that suspends idle containers, meters you by the hour, or moves you onto a different machine every night will drop that connection, and a dropped gateway connection is a bot that is offline until something pokes it. We do none of those things.
Where the 256 MB actually goes
Not on your code. A Discord library caches what the gateway sends it: guilds, channels, roles, and depending on your settings, every member of every server your bot is in. On a bot in five servers that is nothing. On a bot in one server with 200,000 members it is the entire budget, and it grows without you writing a line.
This is the one thing worth understanding before you deploy, because it is the difference between a bot that runs for a year untouched and one that gets killed every few days. Each runtime page below goes into what to change in each language.
What we will not pretend to support
Music bots. Transcoding audio needs several times the memory and CPU a free tier can give you, and a quarter of a core is not the place for it. You can deploy one here and it will start; it will not survive contact with a busy voice channel.
Anything selfbot-shaped is out too, and not for resource reasons. Automating a user account breaks Discord's own terms, and the acceptable use policy treats it exactly the way Discord does.
FAQ
Questions
Node.js, Python or Bun?
Whichever you already write. All three are installed, all three are tested, and all three hold a gateway connection just as well. If you have no preference, Node.js has the larger pool of Discord tutorials written against it and Python is the friendlier language to learn in. Bun runs discord.js too, and starts faster than Node.js. None of these choices is one you are stuck with.
Do I need a domain or a public port for a Discord bot?
No. A gateway bot connects outward to Discord and never accepts an inbound connection, so there is nothing to point a domain at. You would only need one if you were handling HTTP interaction endpoints instead of the gateway, which is unusual for a self-hosted bot.
How many servers can my bot be in?
There is no limit we impose. The practical ceiling is memory: a bot in a few hundred small servers is comfortable, and a bot approaching 2,500 servers has to shard, which is a Discord requirement rather than ours and needs more memory than one free allocation has.
Will my bot show as online all the time?
As long as it stays connected, yes. We do not sleep containers and we do not cap your hours, and a process that crashes is restarted automatically. What we cannot fix is a bot crashing in a loop because of a bug in your code, and the live console is where you will watch that happen.
Hosting something else?
Free tools for Discord bots