Why your bot stops when your PC turns off
A Discord bot is a program that stays connected to Discord all the time. While the program runs, the bot shows as online; when your computer shuts down, sleeps or loses its connection, the bot goes offline and stops answering commands.
So a bot available 24/7 needs a machine that is always on, with a stable connection, that restarts the bot when it crashes.
Three ways to run it
- Your computer or a Raspberry Pi: free, but the machine must stay on; a power or internet outage, a system update, and the bot stops.
- A VPS: a rented server you manage yourself. You install Node.js or Python and set up automatic restarts (pm2, systemd), updates, security, and an HTTPS certificate if your bot has a website.
- A bot host: you upload your code, the service installs it, runs it, restarts it and shows you the logs. That is what Invokara does.
Step 1: prepare your project
Your project must start with a single command: npm start, node index.js or python main.py. List your modules in package.json (Node.js) or requirements.txt (Python).
my-bot/
├── package.json ← or requirements.txt for Python
├── index.js ← entry file
├── .env ← TOKEN=...
├── commands/
└── data/ ← your data (SQLite, JSON…)node_modules, venv or __pycache__ in your zip: they are heavy and reinstalled on the server.Step 2: keep the token out of your code
Your token gives full control of your bot. Put it in a .env file or in your host's variables, never in plain text in your code or in a public GitHub repository.
TOKEN=your_discord_tokenOn Invokara, your .env is read as is, and variables saved in the Variables tab are encrypted; those holding a secret (token, key, password) are never shown again. The panel also checks the token and tells you which intents to enable in the Discord developer portal.
Step 3: put the bot online
- Sign in to Invokara with your Discord account, no password to create.
- Create a bot: a name, the language (Node.js 22 / 24 or Python 3.12) and a plan.
- Upload your code: a
.zip, a GitHub repository (deployed on every push) or a ready-made template. - Click Start: modules are installed and your entry file is found automatically.
Step 4: keep it online
A 24/7 bot must come back by itself after a crash. On Invokara it restarts automatically and you get a direct message; the console explains the error and what to do.
If it crashes 5 times in 10 minutes, it is paused: Discord resets the token of bots that keep reconnecting. You fix the issue, then start it again.
Step 5: monitor and update
- the live console, with the latest logs kept even after a stop;
- RAM and CPU charts;
/restart,/logsand/statusfrom Discord, with the Invokara bot;- updates with a new upload or a
git push; data files (SQLite, JSON…) are kept.
Frequently asked questions
How much RAM does a Discord bot need?
A small discord.js bot usually uses 60 to 150 MB. The Starter plan (256 MB) is enough to begin; take more for music, big caches or many servers.
Can my PC host my bot 24/7?
Yes, if it stays on and connected all the time. Any outage stops the bot, and nothing restarts it without you: for real 24/7, a server or a host is more reliable.
How much does hosting on Invokara cost?
From 2 € per month (Starter, 256 MB RAM, web panel included), no commitment, or 20 € per year. 1 plan = 1 bot.
Do I need to change my code?
No: your .env, your package.json or requirements.txt and your entry file are used as they are.
Sign in with Discord, then upload your project as is.