Host a Discord Bot 24/7 Without Leaving Your PC On
Keep your Discord bot online around the clock without your PC: what you need, how to upload the code, store the token and monitor it on SolumeCore.
To keep a Discord bot online 24/7 without leaving your PC on, run it on an app plan that stays on all the time. On SolumeCore you pick the language of your bot (Node.js or Python), put your code on the app, save the bot token as a secret variable and invite the bot to your server; from then on the bot runs on our servers whether your computer is on, asleep or in a bag.
Why a bot goes offline when your PC sleeps
A Discord bot is just a program that stays connected to Discord. When that program stops, the bot shows as offline. If it runs on your own computer, it stops whenever you:
- close the terminal or the code editor,
- put the PC to sleep, shut it down or restart for an update,
- lose your internet connection or change networks.
Hosting moves that program to a machine whose only job is to keep it running. Your bot's process stays up while the app is on: it isn't put to sleep just because nobody uses it, so there are no cold starts for a bot that has to answer commands instantly. If a plan ever includes a sleep-when-idle policy, the panel shows the app as sleeping, so check your plan's details.
What you need
- A Discord application and its bot token. You create it in Discord's developer portal; the token is the password of your bot, so never share it.
- Your bot's code, written in Node.js (discord.js) or Python (discord.py). You can use your own project or start from a minimal one.
- An app plan with the language you use. See the programming page. The language is chosen when you buy a plan; using a different language later means a different plan.
Three ways to get your code onto the app
| Method | Best for | Where |
|---|---|---|
| Git repository (GitHub, GitLab...) | Most people: one click per update, history and rollback | Code > Deploy > Connect repository |
| Upload files | A quick test without Git | Files > Upload |
| SFTP | Big projects or moving many files | Files > Connect with FileZilla (SFTP) |
If the plan offers ready-made starter templates, they appear in Code > Deploy as extra cards next to the Discord bot assistant. They aren't required.
The path, in five steps
- Pick your language and prepare the code. The step-by-step guides include a minimal working bot: Node.js with discord.js or Python with discord.py.
- Get the code onto the app. With Git, follow Deploy an app from GitHub or GitLab.
- Save the token. The Discord bot assistant (Code > Deploy, or Code > Variables > Import / export) stores it encrypted and checks it with Discord. See Set environment variables for your app or bot.
- Start the app and check it. The assistant's Connect step verifies the token, that the app has it and that the app is running. If something is red, see Why your Discord bot shows offline.
- Invite the bot to your server with the assistant's Invite step.
Keep it healthy once it is online
- Watch it: View your app's logs and live console shows what the bot prints and keeps the history.
- Restart it on a schedule: a nightly restart is easy to set up; see Restart your app and set up auto-restart. A normal bot doesn't open a port, so use a scheduled restart rather than a TCP health check.
- Update it: push to your repository and press Deploy now, or turn on automatic deploys.
- Protect the token: keep it in Variables, out of Git and out of screenshots. If it leaks, press Reset Token in the portal and save the new one.
What to look for in a bot host
When you compare options, check that the host gives you an always-on process, a live console with saved logs, encrypted environment variables, a way to restart and schedule restarts, and Git-based deploys. Those are the things you actually use every week once the bot is live.
FAQ
Do I need to keep my PC on to run a Discord bot 24/7?
No. Once the bot is deployed, it runs on SolumeCore's servers. You can turn off your computer.
Does the bot go to sleep when nobody uses it?
Not by default. The process stays running while the app is on, which is what a bot needs to answer commands at any time. If your plan includes a sleep-when-idle policy, the panel shows the app as sleeping.
Should I use Node.js or Python?
Use the language your bot is written in. The panel supports both, and each has its own guide: discord.js and discord.py.
Is my bot token safe on SolumeCore?
The token is stored encrypted and is hidden in the panel until you press the eye. It's still your responsibility to keep it out of your code and repositories.
Related articles
- Deploy a Discord.js bot (Node.js)
- Deploy a Discord.py bot (Python)
- Why your Discord bot shows offline
- Restart your app and set up auto-restart
Ready to put your bot online around the clock? Compare the Node.js and Python app plans.