Logo

Install Pterodactyl Panel and Wings on Debian 12

Install Pterodactyl Panel and Wings on Debian 12

Deploy a professional game server management panel on your VeryCloud VPS. Pterodactyl is the open-source standard for hosting Minecraft, FiveM, Garry's Mod, Rust, Ark and many other games in isolated Docker containers.

Introduction

Pterodactyl is made of two components:

  • Panel: the web interface (PHP + Laravel + MySQL + Redis) where users manage their servers
  • Wings: the daemon (Go + Docker) that actually runs the game servers

Both can be installed on the same machine or on separate machines to scale. This guide covers an all-in-one install on a single VPS.

Prerequisites

  • Debian 12 VPS with at least 4 GB RAM (8 GB recommended)
  • Domain pointing to the VPS (e.g. panel.your-domain.com)
  • Root access
  • Ports 80, 443, 2022 (Wings SFTP) and 8080 (Wings) open

Step 1: Update and dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git unzip software-properties-common \
  apt-transport-https ca-certificates gnupg lsb-release

Step 2: Install PHP 8.3, MariaDB, Redis, Nginx

Add the Sury PHP repository:

curl -sSL https://packages.sury.org/php/apt.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/sury-php.gpg
echo "deb [signed-by=/etc/apt/keyrings/sury-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
sudo apt update

Install the stack:

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

Install Composer:

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

Step 3: Create the database

sudo mysql

In the MariaDB shell:

CREATE DATABASE panel;
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Step 4: Download Pterodactyl Panel

sudo mkdir -p /var/www/pterodactyl
cd /var/www/pterodactyl
sudo curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz
sudo tar -xzvf panel.tar.gz
sudo chmod -R 755 storage/* bootstrap/cache/

Step 5: Configure the Panel

Copy the environment file and install dependencies:

sudo cp .env.example .env
sudo composer install --no-dev --optimize-autoloader
sudo php artisan key:generate --force

Run the configuration wizards:

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

Migrate the database and create an admin:

sudo php artisan migrate --seed --force
sudo php artisan p:user:make

Step 6: Permissions and cron

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

Add the cron that runs scheduled tasks:

sudo crontab -e

Add the line:

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

Step 7: Queue Worker service

sudo nano /etc/systemd/system/pteroq.service

Content:

[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
StartLimitInterval=180
StartLimitBurst=30
RestartSec=5s

[Install]
WantedBy=multi-user.target

Enable:

sudo systemctl enable --now redis-server pteroq.service

Step 8: Nginx + SSL configuration

sudo nano /etc/nginx/sites-available/pterodactyl.conf

Minimal HTTP config (SSL will be added right after by Certbot):

server {
    listen 80;
    server_name panel.your-domain.com;
    root /var/www/pterodactyl/public;
    index index.php;

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

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        fastcgi_param HTTP_PROXY "";
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }
}

Enable the site and get an SSL certificate:

sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d panel.your-domain.com
sudo systemctl restart nginx

Step 9: Install Docker (for Wings)

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

Step 10: Install Wings

sudo mkdir -p /etc/pterodactyl
sudo curl -L -o /usr/local/bin/wings "https://github.com/pterodactyl/wings/releases/latest/download/wings_linux_amd64"
sudo chmod u+x /usr/local/bin/wings

In the Panel, go to Admin → Nodes → Create New and fill in the information. At the end, copy the Configuration File Content and paste it into:

sudo nano /etc/pterodactyl/config.yml

Create the systemd service:

sudo nano /etc/systemd/system/wings.service

Content:

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

[Service]
User=root
WorkingDirectory=/etc/pterodactyl
LimitNOFILE=4096
PIDFile=/var/run/wings/daemon.pid
ExecStart=/usr/local/bin/wings
Restart=on-failure
StartLimitInterval=180
StartLimitBurst=30
RestartSec=5s

[Install]
WantedBy=multi-user.target

Start Wings:

sudo systemctl enable --now wings

Step 11: Create a Location and Allocation

In the Panel: Admin → Locations → Create New (e.g. Paris-VeryCloud)

Then Admin → Nodes → your node → Allocations: add available IPs and port ranges.

You can now create your first game servers!

Troubleshooting

Wings won't connect to Panel

Check the config:

sudo wings --debug

Common error is an invalid SSL certificate. If Wings and Panel are on the same machine, disable SSL verification in config.yml:

api:
  ssl:
    enabled: false

502 error on the Panel

PHP-FPM is not running:

sudo systemctl restart php8.3-fpm

Disk quota on servers

Enable quotas in /etc/fstab:

UUID=xxx / ext4 defaults,usrjquota=aquota.user,jqfmt=vfsv0 0 1

Conclusion

You now have a professional platform to host game servers. Going further:

  • Add multiple Wings (nodes) on different VPS to spread the load
  • Configure automatic backups (S3, Backblaze B2)
  • Enable 2FA authentication
  • Customize eggs for your own games

Resources

Join our Discord community server

For any questions, suggestions, or just to chat with the community, join us on Discord!

900+Members