Article Background
Back to Knowledgebase

How to Run Multiple Discord Bots on a Single Server

Discord Bots
Sharlet Kurien
July 20, 2026

Running multiple bots on a single server is an efficient way to manage your applications. This guide covers how to structure your files, create a bash startup script, and update your panel settings to launch multiple bot processes simultaneously.

Prerequisites

  • A configured Discord bot server.
  • The source code for each bot uploaded to the server, separated into dedicated folders.
  • Basic familiarity with file management and simple bash commands.

Resource Notice: Every running bot consumes a portion of your allocated CPU and RAM. Make sure your server has enough resources to support multiple active instances.


1. File Structure Setup

To keep things clean, isolate each bot into its own directory within the root server folder (/home/container).

/home/container
 ├── alpha/          <-- Folder for Bot 1 (e.g., Node.js)
 │    ├── package.json
 │    └── index.js
 ├── beta/           <-- Folder for Bot 2 (e.g., Python)
 │    └── main.py
 └── run.sh          <-- Your custom startup script

In this guide, we use alpha and beta as examples. You can name your directories whatever you prefer.


2. Create the Startup Script (run.sh)

Because the server panel relies on a single startup command, direct multi-command strings can cause execution conflicts. We solve this by creating a bash script to handle the sequence.

Create a new file named run.sh in your root directory and add the following lines, adjusting the folder names and execution commands to match your setup:

#!/usr/bin/env bash

# Navigate to Bot 1, start it in the background (&), then move to Bot 2
cd alpha && node index.js &
cd beta && python3 main.py

Why this approach works:

  • The & Operator: Instructs the server to run the first command as a background process, allowing the script to immediately move to the next line without waiting for the first bot to stop.
  • The cd commands: By switching directories before executing each bot, the script preserves local relative paths. This prevents issues with broken internal file paths (like config files or assets) inside your code.

3. Configure the Panel Startup Command

Now, tell the server architecture to execute your custom script when booting up.

  1. Log into the Cubes Server Panel at panel.cubes.host and select your server.
  2. Go to Configuration > Startup Parameters.
  3. Locate the Startup Command input box and change the value to:
    bash run.sh
    
  4. Save your changes.

4. Restart the Server

To apply the changes and launch your bots:

  1. Navigate to System > Console in the sidebar.
  2. Click Restart.

The console will boot using your new script, launching both bot instances concurrently. You can monitor the live output in the console window to verify that both processes initialize successfully.

Special Offer

Ready to Start Your Server?

Get 10% OFF your first month on any server with promo code CUBES10 at checkout!

24/7 Assistance

Need Help With Your Server?

Already a Cubes Hosting customer and couldn't find your answer? Our dedicated support team is available 24/7.