Skip to main content
OrynCloud Logo
OrynCloudDOCS
Bots & Cloud Infrastructure24/7 Hosting

24/7 Discord Bot Hosting Guide

Deploy your Discord and Telegram bots with guaranteed 99.99% continuous uptime, automated package installations, and enterprise token isolation.

1. Supported Runtimes & Languages

Node.jsv18, v20, v22 (LTS)
Python3.10, 3.11, 3.12
JavaOpenJDK 17 & 21
Go / Golang1.21 & 1.22

2. Node.js (discord.js) Setup

Upload your bot files to the root directory. Ensure you provide a package.json:

package.json
{
  "name": "oryn-discord-bot",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "discord.js": "^14.16.3",
    "dotenv": "^16.4.5"
  }
}

Our container will automatically execute npm install upon startup if dependencies are not yet installed.

3. Python (discord.py) Setup

Create a requirements.txt file in your root folder listing all required pip modules:

requirements.txt
discord.py>=2.3.2
python-dotenv>=1.0.1
requests>=2.32.0

Upon boot, pip install -r requirements.txt runs inside your container environment.

4. Secure Environment Variables

Never Hardcode Discord Bot Tokens

Never paste your bot token directly into your source code files. If your code is committed to GitHub or shared, bots scan public repos and reset tokens within seconds.

Instead, create a .env file in your File Manager or define environment variables in the Startup tab of your Pterodactyl panel:

.env
DISCORD_TOKEN=MTA4NzU2OTAx...
CLIENT_ID=10875690...
MONGODB_URI=mongodb+srv://user:pass@cluster...

5. Auto-Restart & 24/7 Uptime

OrynCloud bot hosting includes an automated process supervisor:

  • Auto-Restart on Crash: If an unhandled promise rejection or syntax error causes the process to exit, the supervisor restarts your bot within 2 seconds.
  • Restart Exponential Backoff: Prevents Discord API rate-limiting loops if your code has fatal boot errors.
  • 24/7 Background Persistence: Your bot remains online independently of whether your local machine is on or off.
Was this documentation page helpful?