Hosting a Discord bot on Render in 2026: what breaks and what to use instead

, developer of Bot-Hosting

You deployed your Discord bot on Render, it came online, and 15 minutes later it was gone. The logs show no crash. Nothing is wrong with your code: Render did exactly what its free tier is designed to do.

This post explains why a bot goes to sleep on Render, why the usual keep-alive trick is fragile, what an always-on bot costs there in 2026, and how to move it if you would rather not pay that. We run Bot-Hosting, so judge the facts, not the tone: everything about Render comes from its own pricing page, documentation and terms, checked on 30 November 2026 and linked at the end. If you are comparing several hosts, the Railway vs Render vs Bot-Hosting comparison covers Railway too. This post goes deeper on Render alone.

The short answer

Way to run the bot on RenderStays online?Monthly costThe catch
Free web serviceNo, spins down after 15 minutes$0A Gateway bot receives no inbound traffic
Free web service + a pingerMostly$0Restarts at any time, no persistent files, 750 hours per workspace
Free web service, HTTP interactions botYes, but cold$0Wakes in about a minute; Discord wants an answer within 3 seconds
Background workerYes$7 for 0.5 CPU and 512 MBNo free plan; a disk for your files is extra
Bot-Hosting free planYesFreeA renewal click every 4 days
Bot-Hosting StarterYes$2.291 GB of RAM, two deployments

Render lists its prices in US dollars. The Bot-Hosting prices are the ones the pricing page shows for your region, before VAT.

Why Render puts a Discord bot to sleep

Render’s free instances exist for web services, Postgres and Key Value. Its documentation says that other service types do not support free instances. A free web service is spun down when it “goes 15 minutes without receiving any inbound traffic”, where traffic means HTTP requests and WebSocket messages on connections made to the service.

A classic Discord bot works the other way round. It opens one connection, from your bot to Discord’s Gateway, and receives every event through it. Nothing ever connects to your service from outside, so Render’s router sees 15 quiet minutes and stops the instance. The bot goes offline with it.

Diagram: a Discord bot on a free Render web service holds an outbound connection to the Discord Gateway that Render's router never sees, so the router counts no inbound traffic and spins the service down after 15 minutes; a pinger sending HTTP requests through the router keeps it up; a paid background worker has no router and never spins down

Render says so itself. Its own Discord bot page states: “Gateway bots run as background workers, which need paid compute.”

There is a second reason the free web service is an awkward fit. Render requires every web service to bind to a port, and fails the deploy if it does not detect one. A bot has no reason to listen on a port, which is why every tutorial adds a small web server next to it.

The keep-alive trick, and why it is fragile

The trick goes like this: add a tiny web server to the bot, then point a free uptime monitor at it every 5 minutes. UptimeRobot’s free plan checks every 5 minutes, which is under Render’s 15-minute limit. The web server usually looks like this:

// keep_alive.js: the only job of this file is to receive pings
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('Bot is alive'));
app.listen(process.env.PORT || 3000);

It works, in the sense that the instance stays up most of the time. Here is what you are building on, from Render’s own documentation:

  • Render may restart a free web service at any time. The bot logs in again, and anything it kept in memory is gone.
  • There is no persistent disk on free web services. Files written at runtime are lost on a redeploy, a restart or a spin-down. A SQLite database or a data.json file comes back empty.
  • 750 free instance hours per workspace and per month. One service running all month uses up to 744 of them. A second always-on free service, a test copy of the bot for example, uses up the hours, and Render then suspends all your free web services until the next month.
  • Suspension for unusual outbound traffic. Render may suspend a free web service that initiates “an uncommonly high volume of traffic over the public internet”.
  • A missed ping costs a minute. If the monitor fails once, the service spins down, and waking up takes about a minute before your bot even starts logging in.
  • Render’s own summary of its free instances: “Do not use them for production applications.”

What Render’s terms say about pinging

Render’s free tier page does not mention keep-alive pings, and its Acceptable Use Policy (last modified on 22 August 2025) does not name them either. The policy does forbid attempts to “bypass, circumvent, or defeat any access or usage restrictions”, and misusing the service “to avoid payment or financial responsibility”. Spin-down is a usage restriction of the free tier, and a ping that exists only to defeat it is a grey zone. Render, not you, decides how to read it, and its policy lets it warn, take down content or suspend the account.

We are not lawyers, and many people run this setup without trouble. Just do not build something you care about on a free tier that its owner describes as not for production, held up by a workaround its terms could cover.

The exception: HTTP interactions bots

Discord also supports bots that receive slash commands as HTTP requests to an endpoint you expose, instead of through the Gateway. That model does fit a web service: each command is inbound traffic.

On the free tier, it has another problem. Render’s own Discord page warns that a free web service “spins down after 15 idle minutes” and “wakes in about a minute”, while “Discord expects a reply within 3 seconds, so a cold start can miss it”. The first command after a quiet spell fails. An interactions-only bot also cannot react to events such as a member joining, which need the Gateway.

What an always-on bot really costs on Render

The service type for a Gateway bot is a background worker. Render’s Hobby workspace costs $0 plus compute, and compute has a fixed monthly price per instance, prorated by the second:

InstanceCPURAMPrice per month
Smallest paid0.5512 MB$7
Next size12 GB$25
After that24 GB$85

Then the extras, depending on what your bot keeps:

  • A persistent disk for SQLite or JSON files: $0.25 per GB per month. A 1 GB disk brings the smallest worker to $7.25.
  • Postgres instead of files: a free Render Postgres database expires 30 days after it is created, so a database that lasts is another paid line.
  • Bandwidth: a Hobby workspace includes 5 GB of outbound bandwidth a month, then $0.15 per GB. A bot that only answers commands rarely gets close; one that sends many images can.

So a small bot with its files on a disk costs about $7.25 a month on Render, and more if it outgrows 512 MB. For comparison, Bot-Hosting Starter costs $2.29 a month for 1 GB of RAM, 50% of a CPU core, 5 GB of storage and two deployments, and the free plan runs the same bot with 256 MB of RAM at no cost.

When Render is still the right choice

Render is a good platform, and for some projects the $7 worker is money well spent:

  • The bot is part of a web product. A dashboard, an API and the bot as a worker next to them, deployed from one repository and described in one render.yaml.
  • You want managed Postgres with point-in-time recovery, or preview environments for each pull request.
  • Your team already runs on Render and one more worker is simpler than one more provider.

If the bot is the whole project, a host built for long-running processes costs less and needs no keep-alive server.

Move your bot from Render to Bot-Hosting in 5 steps

Bot-Hosting runs your bot as a process that never sleeps: there is no spin-down timer, because nothing depends on HTTP traffic. Files stay on the deployment between restarts, and a crashed bot is started again on its own (if it crashes twice within a minute, it stays stopped instead of looping).

1. Delete the keep-alive server

Remove keep_alive.js (or the Flask equivalent in Python), its import, the app.listen call and the express or flask dependency. The bot does not need them anymore, and on a small plan the web server costs memory you would rather give the bot.

2. Write down your environment variables

Open your Render service, go to its environment settings and copy every key and value, starting with the bot token. While you are there, note the Start Command and Build Command Render runs.

3. Create the deployment

Sign in to Bot-Hosting.net with Discord and click New deployment:

  1. Type: choose Application.
  2. Source: GitHub with the repository Render deploys from (public URL, or connect GitHub for a private one), or Archive with a zip of the code.
  3. Runtime: Node.js or Python, and the version you used on Render.
The Source step of a new deployment: GitHub selected, a public repository URL pasted, branch master, Pull automatically at every restart ticked, and Node.js picked as the runtime

Click Continue, give the deployment a name and the memory it may use from your plan, then click Launch deployment.

The Configure step of a new Bot-Hosting deployment: its name and project, the memory, CPU and storage given to it, the free pool left on the plan, and the Launch deployment button

4. Match the start command

On every start, a Node.js deployment runs npm install when it finds a package.json, then node on the entry file. Python runs pip install -r requirements.txt, then the entry file. If that is all Render did, set Entry file in Settings > Startup (index.js and main.py are the defaults) and you are done.

If Render ran a build step, for TypeScript for example, put the whole chain in Start command. It replaces the default, so include the install:

npm install && npm run build && npm start

5. Add the token, then switch off Render

Open the Environment tab, click Add variable, name it exactly as your code reads it (DISCORD_TOKEN for example), paste the value and tick Secret. Secret values are hidden in the dashboard and in the logs. If you have many variables, the Raw .env view takes them all at once, one KEY=VALUE per line. Saving restarts the deployment so the values reach your code.

Before you start the bot, suspend or delete the Render service. Two copies logged in with the same token both answer every command. Then click Start and watch the Console: the install, then your bot’s own ready line.

Your data. Files from a Render disk go in a zip you upload in the Files tab. A Render Postgres database comes over with pg_dump and a restore into a managed PostgreSQL deployment, or you can keep the bot on a SQLite file, which survives restarts here.

The limits of the Bot-Hosting free plan

  • 256 MB of RAM, 25% of a CPU core, 512 MB of storage and one deployment. That runs a discord.js or discord.py bot in a few dozen servers. A self-hosted Lavalink music server needs at least 512 MB on its own, so it needs Starter or above.
  • A renewal click every 4 days. The plan stays free; the click proves someone still uses the bot. Miss it and the deployment is suspended until you renew, then deleted if you do not renew within 3 days.
  • No card and no trial end. Paid plans renew on their own.

The Discord bot hosting page lists everything included, and the complete hosting guide walks through a first deployment from scratch.

FAQ

Can I host a Discord bot on Render for free?

Only as a free web service kept awake by an external pinger, with restarts at any time, no persistent files and 750 instance hours per workspace. Render’s own page says Gateway bots need a paid background worker, from $7 a month.

Why does my Render bot go offline after 15 minutes?

Render spins down a free web service after 15 minutes without inbound traffic. Your bot’s connection to Discord is outbound, so Render counts no traffic at all.

Does UptimeRobot keep a Render bot online?

Most of the time. Its free plan checks every 5 minutes, under the 15-minute limit. It does not stop Render from restarting the service, does not give it a disk, and sits in a grey zone of Render’s Acceptable Use Policy.

Do I need to change my bot’s code to leave Render?

No. Only the keep-alive server goes. The bot reads its token from an environment variable and starts with the same command. For a full walkthrough in each language, see the discord.js guide and the discord.py guide.

Sources

Checked on 30 November 2026:

Prices and limits change. If one of these figures is out of date, the provider’s own page is the reference.