How to Keep a Discord Bot Online 24/7

How-toBy discordbothostPublished Updated 3 min read

The short answer: Run your bot on a machine that stays on, provides enough memory and keeps background processes running. Check how the host handles crashes and plan expiry. Keep its token private, log startup failures and avoid repeated command registration. discordbothost does not sleep idle bots. Free requires weekly renewal; paid plans begin at $0.99 a month without that renewal step.

The 24/7 checklist

  1. Always-on machine. Not your laptop. A host, VPS or (if you like tinkering) a Raspberry Pi on wired internet.
  2. No idle sleep. A bot is quiet most of the time. Platforms that sleep "idle" apps disconnect it: Render's free web services spin down after 15 minutes without inbound traffic, and Heroku Eco web dynos sleep after 30 minutes.
  3. Crash recovery. Check whether your host restarts a crashed bot or requires a manual start. On your own VPS, configure a process manager such as pm2 or systemd and test recovery. A Discord gateway reconnect is different from restarting a process that has exited.
  4. Headroom. Leave memory headroom so the bot isn't killed at peak. See how much RAM a bot needs.
  5. Plan expiry. On discordbothost, Free runs for 7 days, then goes offline until you renew. Paid plans remove that weekly renewal step while the subscription is current.
  6. Graceful reconnects. Use a maintained library (discord.js, discord.py, JDA). They resume the gateway session after network blips.

Options compared

Scroll sideways

Reference · Article updated
OptionAlways onSleeps idleAuto-restartYou maintain the OS
Your PCNoYour PC sleepsNoYes
Free web platform (e.g. Render free)YesYesYesNo
VPSYesNoIf you set it upYes
discordbothostYesNoBots restart automatically after a crash. Repeated crashes pause restarts; check the console before starting again.No

Setting it up on discordbothost

  1. Create a server from the discord.js, discord.py or JDA template.
  2. Upload your code (file manager, zip or SFTP; public GitHub push-to-deploy on Free and paid plans).
  3. Add your token as an environment variable and press Start.
  4. Optional (paid plans): add a Discord webhook so crash alerts reach your server.

The bot runs in its own container. Bots restart automatically after a crash. Repeated crashes pause restarts; check the console before starting again. A quiet bot is never put to sleep. On the free plan you renew once every 7 days. Paid plans start at $0.99/month with 512 MB and skip weekly renewal while the subscription is current.

More detail: our 24/7 guide · why bots go offline.

Sources

https://render.com/docs/free; https://devcenter.heroku.com/articles/eco-dyno-hours. Checked .

Questions

How do I keep my Discord bot online 24/7 without my PC?

Run it on a Discord bot host or a server instead of your PC. The host must not sleep idle apps and should restart the bot if it crashes. discordbothost does not sleep idle bots. Bots restart automatically after a crash. Repeated crashes pause restarts; check the console before starting again.

Does pinging my bot with UptimeRobot keep it online?

It only helps on platforms that sleep web apps when nobody visits them, and some platforms disallow it. On a host without idle sleep you don't need it.

What's the cheapest way to run a bot 24/7?

A free bot host if you can renew it regularly; otherwise a $1–3 bot plan. discordbothost Starter is $0.99/month for 512 MB with no renewal.

  1. 1https://render.com/docs/free
  2. 2https://devcenter.heroku.com/articles/eco-dyno-hours
  3. 3https://discordbothost.com/pricing/

Related