<!-- canonical: https://hostdc.xyz/guides/keep-a-discord-bot-online · last updated 2026-09-06 · HostDC, Keep your Discord bot online 24/7. -->

# How to keep a Discord bot online

A Discord bot is online only while its process is running and its gateway connection is alive. Keeping it online means solving four separate problems: a machine that stays on, a supervisor that restarts crashes, a library that reconnects, and a plan that has not lapsed.

## 1. A machine that stays on

Your laptop is not one. It sleeps, it reboots, and its home connection changes address. Run the process on a machine that stays on. HostDC's [free plan](/pricing) does that, with a 256 MB RAM pool, 0.5 CPU and 512 MB storage.

## 2. A supervisor for crashes

Every bot crashes eventually: an unhandled rejection, an out-of-memory kill, a bad deploy. HostDC restarts your bot automatically with backoff and gives up after 5 crashes in 10 minutes, so a broken bot does not restart forever. The last exit reason is on the bot's health card.

## 3. A library that reconnects

Gateway disconnects are normal. Both discord.js and discord.py reconnect on their own if you let them. Do not swallow the error and call `process.exit`, and do not catch `SIGTERM` without shutting down cleanly.

If your bot logs in and quietly stops responding hours later, look for heartbeat warnings in the console before blaming the host.

## 4. A plan that has not lapsed

On Free accounts you reactivate your bots weekly to keep them running. You get one hour of grace after the timer ends before bots pause. Paid plans (Mini, Lite, Pro and Max) never need reactivation. Reminders arrive by email, or as a Discord DM once you link your account, and the link in them opens the reactivation page without signing in. There you solve a quick captcha or watch a 5-second ad.

## Related

- [Host a Node.js bot](/host/node)
- [Host a Python bot](/host/python)
- [Free Discord bot hosting explained](/guides/free-discord-bot-hosting)

## FAQ

### What does "online" mean on the dashboard?
That the process is running *and* your bot printed a line matching ready, logged in or connected to gateway. Running without that line shows as "waiting for the ready signal".

### My bot shows "node down"
The machine hosting it went offline. An admin can move the bot to another node; its `/app` volume does not follow, which is why backups matter on Lite and Pro.

### Does a ping service keep my bot alive?
Not here. There is nothing to ping. HostDC supervises the process instead of waking it with traffic.

### Will you stop my bot for being idle?
No. Idle bots keep running. We compact their memory footprint after several idle hours, which the bot cannot see.
