First: which kind of Discord bot?
A gateway bot (discord.js, discord.py) keeps a WebSocket open and must run 24/7. An HTTP interactions bot only handles slash commands that Discord POSTs to your URL, so it can run on serverless platforms that sleep between requests. Interactions bots cannot read messages or react to events, but many command bots do not need to.
| Option | Gateway bot | Interactions bot | What is free | The catch |
|---|---|---|---|---|
| Oracle Cloud Always Free | Yes | Yes | Arm A1 up to 2 OCPU / 12 GB, or 2 AMD micro VMs with 1 GB | Card required for signup, capacity errors, idle instances can be reclaimed, you manage Linux |
| Cloudflare Workers | No | Yes | 100,000 requests/day, 10 ms CPU per request | No gateway; must verify Ed25519 signatures; 10 ms CPU limit on free |
| Railway | Yes | Yes | Free plan with $1/month of usage (up to 0.5 GB per service) | $1 covers about 100 MB of RAM for a month at published rates: only a very small bot fits |
| Render (free) | No | Yes, with cold starts | Free web services, 750 instance hours/month | Sleeps after 15 min idle; about 1 min to wake, too slow for the 3 second interaction deadline |
| Your own computer or a Raspberry Pi | Yes | Needs a tunnel | Hardware you already own | Power cuts, home internet, your machine must stay on |
Prices verified on 2026-10-19 on the linked official pages. They change: check before you buy.
If free is not enough
The cheapest verified always-on options on 2026-10-19:
- Fly.io: $2.19 per 30 days for shared-cpu-1x with 256 MB in its cheapest regions; Fly's own docs use a 24/7 Discord bot as the example.
- Vultr: $3.50/month for 0.5 GB or $5/month for 1 GB of Regular Performance cloud compute.
- DigitalOcean: $4/month for a 512 MiB Basic Droplet.
- Railway Hobby: $5/month including $5 of usage, the least work of all.
Avoid
Services that ask for your bot token in a web form to 'host it for free', and keep-alive tricks that ping a sleeping free tier to keep it awake; they usually break the provider's terms and stop working without notice.
Build the bot first with the discord.js tutorial, then compare hosts in the comparator.