Skip to main content
You run node index.js or python bot.py, the bot comes online and, as soon as you close the terminal, it disappears from the server. Nothing is wrong with your code. The problem is where the bot is running.

Why the bot stops

The bot is a process, and that process depends on two things you turn off without noticing:
  • The terminal. The process starts as a child of the terminal. Closing the window ends the session, and the system ends the session’s processes with it. The bot goes away at the same moment.
  • The computer. If the PC shuts down, sleeps, restarts for an update or loses its internet connection, the bot goes down with it.
In other words: as long as the bot runs on your machine, it is only online while your machine is on, connected and has that terminal open.

Options to keep the bot online

Leave your PC on

Good enough for testing. It costs nothing beyond electricity. But the bot goes down when the power goes out, when the internet drops or when the system restarts to update. You also need to remember to open the terminal again after every outage.

Rent a VPS and use pm2

A VPS is a Linux server that is always on. pm2 keeps the bot running after you log out of SSH and restarts it if it crashes:
You get full control of the machine. In exchange, you handle everything: system updates, installing Node or Python, firewall setup and figuring out why something stopped.

Use managed hosting

You upload the code, add the token, and the platform runs the process, shows the logs and restarts the bot when it crashes. There is no server to manage. In exchange, you do not touch the machine’s operating system.

The short path: Hyze Cloud

On Hyze Cloud there is nothing to install. It takes three steps:
  1. Upload the code from GitHub or as a ZIP.
  2. Add DISCORD_TOKEN to the environment variables.
  3. Click Deploy application and follow the logs.
Hyze recognizes discord.js and discord.py, starts the bot without asking for a port and restarts the process if it crashes. The full walkthrough, with code samples, is in How to keep your Discord bot online 24/7. Every sign-up gets a 7-day trial. After that, the Starter plan costs R$ 5.99 per month, paid in Brazilian reais via Pix.

Does free hosting sleep?

Many free plans turn the app off after a while without HTTP traffic, and since a Discord bot receives no HTTP traffic, it sleeps and goes offline; on Hyze Cloud, apps are not turned off for being idle.

Next steps

Bot online 24/7

Prepare the code, store the token and deploy.

Open the dashboard

Create your account and get a 7-day trial.
Last modified on October 18, 2026