NewSchokr 13 is here. A whole new UI, seven locations, snapshots and more. Read more →

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

Pick a runtime

Your bot is written inTemplate to useDependency file
JavaScript with discord.js, Eris, etc.Node.jspackage.json
TypeScript or JavaScript, run with BunBunpackage.json
Python with discord.py, nextcord, py-cord, etc.Pythonrequirements.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 typeSuggested memory
Small bot in a handful of servers256 to 512 MB
Bot in hundreds of servers, or with a database512 MB to 1 GB
Music bot or heavy image processing1 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

  1. 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.
  2. Upload your code with the web file manager. Don't upload node_modules or a Python virtual environment; upload the dependency file instead.
  3. Put your token in a .env file on the server, not in the code. See storing your bot token safely.
  4. In your server's Startup settings, set the main file or startup command to your bot's entry point.
  5. 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

Still stuck?

Ask in the Schokr Discord and include the last lines of your console output (with your token removed).