A specialized Pterodactyl Egg for Node.js Discord bots, optimized for fast deployments, automatic dependency installation, and flexible package manager detection.
The Problem:
Many standard Node.js eggs are too generic for Discord bots. This often leads to issues with dependency installation, lockfiles, or manually switching between npm, yarn, and pnpm.
The Solution:
This egg is specifically tuned for Discord bots and automatically selects the right package manager. It also installs dependencies intelligently at startup (based on AUTO_UPDATE or a missing node_modules folder), so your bot starts faster and more reliably.
This egg supports the official Parkervcp/Yolks Node.js Docker images:
- Node.js 18
- Node.js 19
- Node.js 20
- Node.js 21
- Node.js 22
- Node.js 23
- Node.js 24
- Node.js 25
- Optimized for Discord bot workloads
- Supports
npm,yarn,pnpm, andautodetection - Automatic dependency installation on startup
- Lockfile-aware preference (
pnpm-lock.yaml,yarn.lock, otherwisenpm) - Flexible entrypoint via
MAIN_FILE - Optional
BOT_TOKENvariable to keep secrets out of your codebase
| Variable | Recommended value | Explanation |
|---|---|---|
MAIN_FILE |
index.js |
Main file executed by Node. |
PACKAGE_MANAGER |
auto |
Lets the egg decide whether to use npm, yarn, or pnpm. |
AUTO_UPDATE |
1 |
Installs/refreshes dependencies on startup or when node_modules is missing. |
BOT_TOKEN |
(your token) | Helps keep your Discord token outside your source code. Use it in your bot through process.env.BOT_TOKEN. |
- Open your Pterodactyl Admin Panel.
- Go to
Nestsand choose your preferred nest (or create a new one). - Import the
egg.jsonfrom this Discord Bot Egg. - Create a new server using this egg.
- Upload your bot files (
package.json, bot code, and lockfile if available). - Configure variables:
MAIN_FILE(for exampleindex.jsorsrc/bot.js)PACKAGE_MANAGERset toauto(recommended)AUTO_UPDATEset to1BOT_TOKENwith your real Discord token
- Start de server.
-
Bot does not start / main file not found
Make sureMAIN_FILEexactly matches your file name and path. -
Dependencies are not being installed
SetAUTO_UPDATEto1ortrue, or removenode_modulesand restart. -
Wrong package manager selected
Manually setPACKAGE_MANAGERtonpm,yarn, orpnpm. -
Token issues / invalid token
Check yourBOT_TOKENvariable and confirm your code usesprocess.env.BOT_TOKEN.
- PayPal: paypal.me/JoopDev
- Website: JoopDev.com
Author: JoopDev (AKA. Vdbergjohannes)