Pterodactyl Guide

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

OSVersionSupported
Ubuntu22.04, 24.04Yes
Debian10, 11, 12, 13Yes
Rocky Linux8, 9Yes
AlmaLinux8, 9Yes

Note: On some systems, you must be logged in as root before running the command. Using sudo in front may not work.

For more details and a video walkthrough, visit the GitHub repository (opens in a new tab).

Available Eggs

Egg FilePurpose
egg-node-js-generic.jsonGeneric Node.js egg with full configuration options
egg-node-j-s--universal.jsonUniversal Node.js egg
egg-a-i-o.jsonAll-in-one egg
egg-lavalink.jsonDedicated Lavalink server egg

Installing an Egg

  1. Open your Pterodactyl admin panel.
  2. Go to Nests > select or create a nest.
  3. Click Import Egg.
  4. Upload the desired .json egg file.
  5. Save.

Setting Up the Bot Server

Step 1 - Create the Server

  1. In Pterodactyl admin, click Create Server.
  2. Select the imported Node.js egg.
  3. Configure resources (CPU, RAM, Disk).
  4. 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:

VariableValue
TOKENYour Discord bot token
NODE_ENVproduction

Step 4 - Install Dependencies

Use the Pterodactyl console or startup command to run:

npm install

Step 5 - Build (if uploading source)

If you uploaded the TypeScript source instead of pre-built dist/:

npm run build
npm run build:data

Step 6 - Start

The startup command should be:

node dist/index.js

Setting Up Lavalink on Pterodactyl

Step 1 - Import the Lavalink Egg

Upload egg-lavalink.json to your Pterodactyl panel.

Step 2 - Create a Lavalink Server

  1. Create a new server using the Lavalink egg.
  2. 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.jar

Step 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:

ServiceDefault PortRequired
Bot REST API (Fastify)2555Yes, if using the dashboard
Bot WebServer (Express)2444Yes, if using webhooks
Lavalink2333Yes

Add these as additional allocations in the server's network configuration.

Troubleshooting

ProblemSolution
EACCES on port bindEnsure the port is allocated in Pterodactyl's allocation settings
Lavalink can't startVerify Java 17+ is available in the egg's Docker image
Bot can't connect to LavalinkCheck that the Lavalink port is allocated and the firewall allows internal traffic
npm install failsEnsure the egg's Docker image includes build tools (python3, make, g++) for native modules
Out of memoryIncrease the server's RAM allocation; Lavalink needs at least 512 MB