How to host a Discord bot on Schokr for free
An overview of running a Discord bot 24/7 on Schokr with the Node.js, Bun or Python runtime: what you need, how much memory to give it, and where to start.
Updated · 2 min read
You can host a Discord bot on Schokr for free by creating a server from the Node.js, Bun or Python template, uploading your bot's code with the file manager, and pointing the server's Startup settings at your main file. The bot runs 24/7, because Schokr servers don't sleep when idle.
What you need
- An Schokr account at console.schokr.gg.
- A Discord application with a bot user and its token. See how to create a bot and get its token.
- Your bot's code, written for a library such as discord.js (JavaScript/TypeScript) or discord.py (Python).
Pick a runtime
| Your bot is written in | Template to use | Dependency file |
|---|---|---|
| JavaScript with discord.js, Eris, etc. | Node.js | package.json |
| TypeScript or JavaScript, run with Bun | Bun | package.json |
| Python with discord.py, nextcord, py-cord, etc. | Python | requirements.txt |
TypeScript can also run on the Node.js template after a build step. See hosting a TypeScript bot.
How much memory and CPU to give it
Schokr's free package is one pool per team: 6 GB memory, 150% CPU (1.5 cores), 10 GB disk and up to 4 server slots, which you split across your servers however you like. Typical needs:
| Bot type | Suggested memory |
|---|---|
| Small bot in a handful of servers | 256 to 512 MB |
| Bot in hundreds of servers, or with a database | 512 MB to 1 GB |
| Music bot or heavy image processing | 1 GB or more |
Start small and adjust after watching real usage in the Resources view. You can always rebalance the pool later. Bots do not need a public port, so the default single port allocation is fine.
The deployment flow
- Create a server in the console from the Node.js, Bun or Python template. Choose the location closest to you or to any external services (like a database) your bot uses.
- Upload your code with the web file manager. Don't upload
node_modulesor a Python virtual environment; upload the dependency file instead. - Put your token in a
.envfile on the server, not in the code. See storing your bot token safely. - In your server's Startup settings, set the main file or startup command to your bot's entry point.
- Start the server and watch the console for your bot's "logged in" message.
Step-by-step guides:
Starting from zero?
If you don't have a bot yet, follow build a discord.js bot from scratch or build a discord.py bot from scratch, then invite it to your server.
Common first problems
- Bot is online but ignores commands: bot online but not responding.
- "Used disallowed intents": privileged intents.
- "An invalid token was provided": invalid token errors.
- Bot keeps going offline: crash loops and restarts.
Still stuck?
Ask in the Schokr Discord and include the last lines of your console output (with your token removed).