
Pterodactyl is an excellent platform for hosting applications that need to run 24/7 — such as a Discord bot. Note that you are not hosting a Discord server itself, but rather the bot's program code that connects to the Discord service.
Prerequisites: Before you begin, make sure you have the following ready:
The Egg you need depends on the programming language your bot is written in — Python, JavaScript/Node.js, and others are all available. You can find a wide selection on pterodactyleggs.com.
.json file for the EggUpload the downloaded Egg to your Pterodactyl panel:
.json file, and assign it to a Nest — e.g. create a new one called BotsCreate a server instance for your bot to run on. Most bots are very lightweight and don't require much CPU or RAM.
Your bot's code needs to be uploaded to the server before it can run:
index.js, bot.py, package.json, or any other project filesThe bot needs its token to authenticate with Discord's services:
BOT_TOKEN or similarNever share your Bot Token! This token provides full control over your bot. Treat it like a password and never make it public or commit it to a public repository.
With everything configured, you can now start your bot:
package.json) before starting the botFor help building your bot, refer to the official Discord developer documentation.