Free bot hosting: sleep, limits and hidden trade-offs

Free bot hosting almost always has a hidden cost: sleep after inactivity, capped hours, temporary disks or the risk that the service shuts down. For a bot that must stay online around the clock, that usually breaks it.

Updated 5 min read

Learning objectives

After reading this article you will be able to:

  • Understand why a free offer puts a bot to sleep or takes it down
  • Know the real limits of Render, Oracle Cloud, Glitch and Heroku
  • Decide when a free offer is enough and when paying makes sense
On this page

Anyone shipping a first bot searches for "free hosting" for an obvious reason: nobody wants to pay before knowing the bot works. The catch is that a bot is not a website. It needs a live process all the time, and almost every free offer was designed for low-traffic sites.

Below is what each kind of free offer usually delivers, where it breaks a bot, and when it is still fine to use. The numbers behind these offers change often, so check each provider's documentation for current values.

Bot: outbound connectionInbound traffic (HTTP)requestminutes, no trafficServiceactiveasleep, bot offlineactivecold start0h24h
The platform only sees inbound traffic: without it, the service sleeps and the bot stays offline until something wakes it.

Why doesn't a bot work on an offer that sleeps?#

A Discord bot opens a WebSocket connection to the Discord Gateway and keeps it open, sending heartbeats. Messages, commands and events arrive over that connection. If the process stops, the connection drops and the bot shows as offline. The Gateway documentation describes this cycle.

Offers that sleep on inactivity measure activity as inbound traffic: HTTP requests reaching your service. A Discord bot barely receives any, because it opens the connection outward. From the platform's point of view, the service is idle, even if the bot is busy answering commands. The same applies to a Telegram bot using long polling.

What does Render's free offer include?#

Render's documentation describes limits like these for free web services (the exact values are on that page):

  • spin down after a few minutes without inbound traffic;
  • a noticeable wait to come back on the next request;
  • a monthly hour quota per workspace; when it runs out, free services stay suspended until next month;
  • an ephemeral filesystem: local files are lost on redeploy, restart or spin-down, and there are no persistent disks;
  • outbound email (SMTP) ports blocked.

Other service types, such as background workers, are not listed as free. In practice, a Discord bot there would have to pose as a website and be pinged from outside all the time, and it would still lose any file written to disk, such as a SQLite database.

Render's free Postgres expires a few weeks after creation, with a grace period before deletion, holds little data and has no backups. The free Key Value (Redis-compatible) store keeps data in memory only and loses everything on restart.

What about Oracle Cloud's Always Free resources?#

This is the free offer closest to a real machine. According to Oracle's documentation, it includes a few small AMD instances and an Arm Ampere A1 allowance, plus block storage. The exact size of each resource is on that page.

The hidden costs are different:

  • Idle reclamation. Oracle may reclaim instances it considers idle, based on CPU and network use (and memory use on A1) over several days. A small bot often sits under that line.
  • Capacity shortages. The "out of host capacity" error appears when the region has nothing available, and all you can do is retry later.
  • You run the server. It is a VM: operating system, security updates, firewall, process supervisor and restarts are your job. See VPS for a Discord bot.
  • Fixed home region. Instances must be created in your account's home region.

If you can administer Linux and accept the risk, it works. If you only want to upload your code, it is a lot of work.

Which free platforms are gone?#

Providers that used to be the entry point for bots stopped being an option:

  • Heroku: since November 28, 2022 it no longer offers free dynos, Postgres or Redis (official notice).
  • Glitch: ended project hosting on July 8, 2025 (announcement).

The lesson is about planning: a bot that grows on top of a free offer depends on a decision the provider can make at any time. If the bot has users, a forced migration becomes downtime.

Can an external ping keep the bot awake?#

For an HTTP service, yes: an external monitor hitting a URL every few minutes avoids the inactivity sleep. But it is a patch. It burns your monthly hours, does nothing about the ephemeral disk, and depends on a third party that can fail.

If you need to know why the bot went down, read why a Discord bot goes offline to tell a process crash from a connection problem.

When is a free offer still fine?#

  • Learning and testing a bot nobody uses yet.
  • A site or API that only answers requests and tolerates a wait on the first call.
  • A portfolio project that can be offline.

It does not suit a community bot, a music bot, a WhatsApp bot with a saved session, or anything that loses data when the disk is wiped. Running on your own computer is another temporary option, but the bot stops when the machine does, as running a bot on a phone or PC vs hosting explains. To estimate what a paid bot costs, see how much it costs to host a Discord bot and how to keep a bot online 24/7.

How to do this on Square Cloud#

Once the bot is past testing, it needs the opposite of every limit in this article. On Square Cloud the entry plan is paid, and what it covers answers those limits one by one:

  • Sleep on inactivity: the application runs in an isolated, always-on container, with no cold start, no sleep mode and no inactivity rule. It does not depend on inbound traffic, so a Discord bot or a Telegram bot using polling needs no external ping.
  • Monthly hours: the container stays on all month, with no hour quota to burn through.
  • Temporary disk: the disk persists across restarts and deploys, so a SQLite database or a WhatsApp bot's session folder stays in place.
  • Expiring database: PostgreSQL, MySQL, MongoDB and Redis hosting starts on Standard, from R$44.99 per month, with an automatic daily snapshot.
  • Restarts: automatic restart is on by default for dashboard deploys and brings the application back when the process exits with an error.

Hobby costs R$12.49 per month for 1 GB of RAM and 1 vCPU, covering bots and sites. RAM is a pool shared across your applications, with a 256 MB minimum per background application such as a bot, and you pay by Pix or card with no lock-in. Discord, Telegram and WhatsApp each have a page with the compatible libraries; start at bot hosting and compare plans on pricing.

Bot hosting

Keep your bot online 24/7 with automatic restarts

Learn more

FAQs

Can I host a Discord bot for free 24/7?

In a few cases, such as Oracle Cloud's Always Free resources, but idle instances can be reclaimed and capacity is not guaranteed. Offers that sleep on inactivity, like Render's free web services, do not suit a bot that holds an open connection.

Why does my bot go offline on free hosting?

Usually the service slept because it got no inbound traffic, ran out of monthly hours, or restarted and lost its local files. A Discord bot only receives events over a connection it opens itself, so it never produces the traffic that keeps a service awake.

Does Heroku still have free hosting?

No. Since November 28, 2022 Heroku no longer offers free dynos, Postgres or Redis. Its entry plans are paid.

Does Glitch still host bots?

No. Glitch ended project hosting on July 8, 2025, so bots that relied on it had to move.

Next articleWhat is Lavalink? Hosting a Discord music botLavalink is a standalone audio server that plays music for Discord bots outside the bot process. Learn how it works, what it needs and how to host it.