Pterodactyl Guide
Meww.me includes pre-built egg configurations for the Pterodactyl Panel (opens in a new tab), a game server management platform commonly used for hosting Discord bots.
The egg files are located in additional-file/Eggs Panel Pterodactyl/.
Installing Pterodactyl Panel
If you don't have Pterodactyl Panel installed yet, you can use the unofficial installer script from pterodactyl-installer (opens in a new tab).
Run the following command as root:
bash <(curl -s https://pterodactyl-installer.se)The script will ask whether you want to install the Panel, Wings, or both. It handles all dependencies, database setup, cronjob, Nginx, and optional Let's Encrypt SSL configuration automatically.
Supported Operating Systems
| OS | Version | Supported |
|---|---|---|
| Ubuntu | 22.04, 24.04 | Yes |
| Debian | 10, 11, 12, 13 | Yes |
| Rocky Linux | 8, 9 | Yes |
| AlmaLinux | 8, 9 | Yes |
Note: On some systems, you must be logged in as root before running the command. Using
sudoin front may not work.
For more details and a video walkthrough, visit the GitHub repository (opens in a new tab).
Available Eggs
| Egg File | Purpose |
|---|---|
egg-node-js-generic.json | Generic Node.js egg with full configuration options |
egg-node-j-s--universal.json | Universal Node.js egg |
egg-a-i-o.json | All-in-one egg |
egg-lavalink.json | Dedicated Lavalink server egg |
Installing an Egg
- Open your Pterodactyl admin panel.
- Go to Nests > select or create a nest.
- Click Import Egg.
- Upload the desired
.jsonegg file. - Save.
Setting Up the Bot Server
Step 1 - Create the Server
- In Pterodactyl admin, click Create Server.
- Select the imported Node.js egg.
- Configure resources (CPU, RAM, Disk).
- Set the startup parameters.
Step 2 - Upload the Code
Upload the bot code to the server via:
- Pterodactyl file manager
- SFTP client
Ensure the following files are present:
config.yml
package.json
dist/ (compiled TypeScript output)
node_modules/ (after npm install)Step 3 - Configure Environment Variables
In the server's Startup tab, set:
| Variable | Value |
|---|---|
TOKEN | Your Discord bot token |
NODE_ENV | production |
Step 4 - Install Dependencies
Use the Pterodactyl console or startup command to run:
npm installStep 5 - Build (if uploading source)
If you uploaded the TypeScript source instead of pre-built dist/:
npm run build
npm run build:dataStep 6 - Start
The startup command should be:
node dist/index.jsSetting Up Lavalink on Pterodactyl
Step 1 - Import the Lavalink Egg
Upload egg-lavalink.json to your Pterodactyl panel.
Step 2 - Create a Lavalink Server
- Create a new server using the Lavalink egg.
- Allocate at minimum:
- RAM: 512 MB (1 GB recommended)
- CPU: 100% of one core
- Disk: 500 MB
Step 3 - Configure Lavalink
Upload your application.yml to the server root. Use the reference file at additional-file/application.yml as a starting point.
Key settings to verify:
server:
port: 2333
address: 0.0.0.0
lavalink:
server:
password: "youshallnotpass"Step 4 - Start Lavalink
The Lavalink egg should handle the startup command automatically:
java -jar Lavalink.jarStep 5 - Connect the Bot
In your bot's config.yml, point the Lavalink node to the Pterodactyl server:
lavalink:
NODES:
- host: "your-pterodactyl-server-ip"
port: 2333
name: "Pterodactyl"
auth: "youshallnotpass"
secure: false
driver: "lavalink/v4"If the bot and Lavalink are on the same Pterodactyl node, you may be able to use the internal network IP instead of the public IP.
Port Allocation
When creating servers in Pterodactyl, ensure the following ports are allocated:
| Service | Default Port | Required |
|---|---|---|
| Bot REST API (Fastify) | 2555 | Yes, if using the dashboard |
| Bot WebServer (Express) | 2444 | Yes, if using webhooks |
| Lavalink | 2333 | Yes |
Add these as additional allocations in the server's network configuration.
Troubleshooting
| Problem | Solution |
|---|---|
EACCES on port bind | Ensure the port is allocated in Pterodactyl's allocation settings |
| Lavalink can't start | Verify Java 17+ is available in the egg's Docker image |
| Bot can't connect to Lavalink | Check that the Lavalink port is allocated and the firewall allows internal traffic |
npm install fails | Ensure the egg's Docker image includes build tools (python3, make, g++) for native modules |
| Out of memory | Increase the server's RAM allocation; Lavalink needs at least 512 MB |