Introduction

Pterodactyl is one of the most powerful open‑source game server management panels available. Unlike simple drag‑and‑drop tools, it gives you full control over your hosting environment by running directly on your own VPS or dedicated server. You’ll need root access to install it, but once set up, it provides a fast, secure, and reliable way to manage servers.


Table of Contents

  • Installing Pterodactyl Panel
    • Picking an OS
    • Installing Required Dependencies
    • Installing Composer
    • Downloading Panel Files
    • Panel Installation
    • Queue Listeners
    • Webserver Configuration
  • Installing Wings
  • Creating a Server

1. Picking an OS

Pterodactyl runs on many Linux distributions. Choose one you’re comfortable with, but make sure it’s supported.

⚠️ Important Warning: Pterodactyl does not support most OpenVZ systems due to Docker incompatibilities. Use a KVM VPS or a dedicated server for best results.

Supported Operating Systems

  • Ubuntu
    • 22.04 → Works perfectly (extra PHP repos required)
    • 24.04 → Highly recommended
  • Debian
    • 11 → Stable and widely supported
    • 12 → Latest support and improvements
  • RHEL / Rocky Linux / AlmaLinux
    • 8 → Supported with extra repositories
    • 9 → Fully supported and recommended

2. Installing Required Dependencies

Before installing Pterodactyl, install the required dependencies.

Dependencies:

  • PHP 8.2 or 8.3 with extensions: cli, openssl, gd, mysql, PDO, mbstring, tokenizer, bcmath, xml/dom, curl, zip, fpm
  • MySQL 5.7.22+ (MySQL 8 recommended) or MariaDB 10.2+
  • Redis (redis-server)
  • Webserver: NGINX, Apache, or Caddy
  • Utilities: curl, tar, unzip, git
  • Composer v2

Example Install (Ubuntu)

apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php

curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list

apt update
apt -y install php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb-server nginx tar unzip git redis-server

3. Installing Composer

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

4. Download Panel Files

mkdir -p /var/www/pterodactyl
cd /var/www/pterodactyl

curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz
tar -xzvf panel.tar.gz

chmod -R 755 storage/* bootstrap/cache/

5. Panel Installation

Database Setup

mysql -u root -p
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'yourPassword';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
exit

Environment Setup

cp .env.example .env
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
php artisan key:generate --force
???? DANGER: Backup your APP_KEY from .env. If lost, all encrypted data (e.g., API keys) is permanently unrecoverable.
grep APP_KEY /var/www/pterodactyl/.env

Configure Environment

php artisan p:environment:setup
php artisan p:environment:database
php artisan p:environment:mail

Run Database Migrations

php artisan migrate --seed --force

Create Admin User

php artisan p:user:make

Permissions

chown -R www-data:www-data /var/www/pterodactyl/*

6. Queue Listeners

Crontab

sudo crontab -e
* * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1

Queue Worker

[Unit]
Description=Pterodactyl Queue Worker
After=redis-server.service

[Service]
User=www-data
Group=www-data
Restart=always
ExecStart=/usr/bin/php /var/www/pterodactyl/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
RestartSec=5s

[Install]
WantedBy=multi-user.target
sudo systemctl enable --now redis-server
sudo systemctl enable --now pteroq.service

7. Webserver Configuration

⚠️ WARNING: If using SSL, you must create certificates first. Without them, your webserver will fail to start. If you’re using Caddy with automatic SSL, certificates are handled for you.
rm /etc/nginx/sites-enabled/default
server {
    listen 80;
    server_name ;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name ;
    root /var/www/pterodactyl/public;
    index index.php;

    ssl_certificate /etc/letsencrypt/live//fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live//privkey.pem;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
sudo systemctl restart nginx

8. Installing Wings

Supported Systems

  • Ubuntu 20.04 / 22.04 / 24.04 ✅
  • Debian 11 / 12 ✅
  • RHEL / Rocky Linux / AlmaLinux 8 / 9 ✅
  • Windows ❌ Not supported
⚠️ Note: Avoid VPS providers using OpenVZ or LXC. Docker support is often missing. KVM is the safest choice.

Install Docker

curl -sSL https://get.docker.com/ | CHANNEL=stable bash
sudo systemctl enable --now docker

Install Wings

sudo mkdir -p /etc/pterodactyl
curl -L -o /usr/local/bin/wings "https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_$( [[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64" )"
sudo chmod u+x /usr/local/bin/wings

Configure Wings

Create a node in your panel, then copy the Configuration block into /etc/pterodactyl/config.yml.

Start Wings

sudo wings --debug

Daemonize Wings

[Unit]
Description=Pterodactyl Wings Daemon
After=docker.service
Requires=docker.service

[Service]
User=root
WorkingDirectory=/etc/pterodactyl
ExecStart=/usr/local/bin/wings
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
sudo systemctl enable --now wings

9. Node Allocations

Allocations are IP + Port combinations used by servers. Go to Nodes > Your Node > Allocation in the panel to add them.

Kas see vastus oli kasulik? 1 Kasutajad peavad seda kasulikuks (1 Hääled)