Replit, Glitch, Heroku: where to host a Discord bot for free

Many tutorials still explain how to host a Discord bot for free on Replit, Glitch or Heroku. These methods no longer work: Glitch stopped hosting projects on July 8, 2025, Heroku removed its free dynos on November 28, 2022 and Replit withdrew Always On in early 2024. The bot’s code is still good. This guide shows what to remove, what to keep and how to put the bot back online somewhere else.

The essentials

  • Glitch has not hosted projects since July 8, 2025 and Heroku has had no free dyno since November 28, 2022.
  • On Replit, a free bot no longer stays online around the clock since Always On was withdrawn.
  • The keep_alive server and the monitoring ping should be deleted: they are only useful on a platform that puts the bot to sleep.
  • discord.py or discord.js code moves as is, with the token in an environment variable.
  • The ACLClouds Free plan does not put the bot to sleep, but is renewed by hand every 4 days.
ACLClouds
ACLClouds

Replit, Glitch, Heroku: where to host a Discord bot for free

Glitch has shut down its hosting, and Heroku and Replit no longer keep a free bot online. How to move a discord.py or discord.js bot without rewriting it.

Many tutorials still explain how to host a Discord bot for free on Replit, Glitch or Heroku. These methods no longer work: Glitch stopped hosting projects on July 8, 2025, Heroku removed its free dynos on November 28, 2022 and Replit withdrew Always On in early 2024. The bot’s code is still good. This guide shows what to remove, what to keep and how to put the bot back online somewhere else.

  • Glitch has not hosted projects since July 8, 2025 and Heroku has had no free dyno since November 28, 2022.
  • On Replit, a free bot no longer stays online around the clock since Always On was withdrawn.
  • The keep_alive server and the monitoring ping should be deleted: they are only useful on a platform that puts the bot to sleep.
  • discord.py or discord.js code moves as is, with the token in an environment variable.
  • The ACLClouds Free plan does not put the bot to sleep, but is renewed by hand every 4 days.

What changed on these three platforms

All three services went the same way: running a program around the clock costs money, and the free plan was cut back or closed. A Discord bot keeps a connection open at all times, so it is the first kind of project affected.

  • Glitch: project hosting has been shut down since July 8, 2025. A bot that ran there is offline.
  • Heroku: no free dyno since November 28, 2022. The first plan is paid.
  • Replit: Always On was withdrawn in early 2024. A program that runs around the clock needs a paid deployment, and a free project stops when you close the editor.

Why keep_alive is no longer useful

The classic trick was to add a small web server to the bot (Flask in Python, Express in Node.js), then have a monitoring service call it every five minutes to prevent it from going to sleep. It worked around a platform limit. On a host that does not put the bot to sleep, this web server does nothing useful and uses memory.

  • Python: delete the keep_alive.py file, the keep_alive() call and the flask line in requirements.txt.
  • Node.js: delete the Express or http server added for the ping, and the express dependency if nothing else uses it.
  • Also delete the check on the monitoring service side: it would call an address that no longer exists.

Prepare the code before moving it

Download the project as a zip archive from Replit, or use your copy on GitHub or on your computer. Then check three points: the dependency list, how the token is read and how data is stored.

  • Dependencies: a requirements.txt with discord.py in Python, a package.json with discord.js and a start script in Node.js. Do not upload the .replit and replit.nix files or the node_modules folder.
  • Token: Replit Secrets are environment variables. os.environ["DISCORD_TOKEN"] or process.env.DISCORD_TOKEN work elsewhere without any change. Read the guide to keep the token out of the code.
  • Data: the Replit DB database (from replit import db) only exists on Replit. Replace it with a JSON file or with SQLite, which is included in Python.

Put the bot back online

With the ACLClouds Free plan for Discord bot hosting, the move takes about ten minutes. Create an account, choose the Python or Node.js environment, then replace the sample project with your files from the Files tab or over SFTP on port 2222.

  • Paste the token into the "Bot token" card in the console, or in the Startup tab. If your code reads a variable with a different name, for example TOKEN, add it under that name in the environment variables.
  • Start the bot and read the console: your bot’s login line must appear, with no error before it.
  • The full step-by-step, from creating the bot to the first command, is in the tutorial on hosting a Discord bot for free.

Common errors after a move

Most failures come from a leftover of the old platform in the code. Read the first error line in the console: it almost always names the file and the module involved.

  • ModuleNotFoundError: No module named replit or flask. An import from the old platform is still there: delete it. For another module, follow the guide ModuleNotFoundError in Python.
  • Cannot find module in Node.js: the dependency is missing from package.json. See the guide Cannot find module.
  • Login error with an empty token: the variable name in the code does not match the one saved in the panel.
  • The bot starts then stops with code 137: it exceeds the plan’s memory. See exit code 137.

The limits of the Free plan

A free plan always comes with a trade-off, and it is better to know it before moving a bot. At ACLClouds, the bot is not put to sleep, but you have to renew it by hand, for free, every 4 days from its page. Without a renewal, it is suspended until the next one.

  • 1 bot per account, in Node.js or Python, without a credit card.
  • 315 MB of RAM, 0.25 vCPU and 715 MB of storage: enough for a command or moderation bot on a few servers.
  • Console, logs and SFTP access included. A MariaDB database needs a paid plan.
  • For a bot that must not depend on any renewal, compare with a server: free bot or VPS, when to move to a server.

Frequently asked questions

Can my Replit bot still run 24/7 for free?

No. Since Always On was withdrawn, a free project stops when the editor is closed, and a program that runs around the clock needs a paid deployment.

Do I have to rewrite the bot to change hosts?

No. A discord.py or discord.js bot works anywhere Python or Node.js is installed. You only have to remove the keep_alive server, replace Replit DB if you used it and check the dependency list.

Is a ping service enough to keep a bot online?

No. A ping only wakes up a web server that its platform put to sleep. It does not replace a machine that runs the bot around the clock.

What happens to my bot if I forget to renew the Free plan?

It is suspended on the due date. You renew it for free from its page, then restart it: the files are still there.