Servers99 - Install Pterodactyl Panel on a Dedicated Server (Ubuntu/Debian)

 

This tutorial shows how to install the Pterodactyl Panel on a dedicated server running Ubuntu or Debian. It includes dependencies, database setup (MariaDB/MySQL), Nginx configuration, cron + queue worker setup, and optional SSL (HTTPS) using Certbot.


Before You Begin

Supported Operating Systems

Pterodactyl Panel supports modern Linux distributions such as:

  • Ubuntu 22.04 / 24.04
  • Debian 11 / 12 / 13
  • RHEL-based distributions (Rocky/Alma/RHEL)

Requirements (Dependencies)

You’ll need:

  • PHP 8.2 or 8.3 with extensions: cli, openssl, gd, mysql, PDO, mbstring, tokenizer, bcmath, xml/dom, curl, zip and fpm (for Nginx)
  • MySQL 5.7.22+ (MySQL 8 recommended) or MariaDB 10.2+
  • Redis (redis-server)
  • A web server (this guide uses Nginx)
  • Utilities: curl, tar, unzip, git
  • Composer v2

Step 1 - Update the Server

Log in as root (or use sudo -i), then run:

apt update && apt -y upgrade

Step 2 - Install Dependencies (Ubuntu/Debian)

2.1 Install base packages

apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg

This enables add-apt-repository and installs tools used throughout the setup.

2.2 (Ubuntu 22.04 only) Add PHP repository

LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
apt update

2.3 Add Redis repository (recommended)

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

2.4 Install Nginx + allow firewall (optional)

sudo apt -y install nginx
# If UFW is enabled:
sudo ufw allow 'Nginx Full'

2.5 Install PHP, MariaDB, Redis, and utilities

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

Step 3 - Install Composer (v2)

Composer is required to install Panel dependencies:

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

Step 4 - Download the Pterodactyl Panel

Create the installation directory:

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

Download and extract the latest Panel release:

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/

Step 5 - Create the Database and User

Log in to MariaDB:

mariadb -u root -p

Create the database and user (replace YOUR_STRONG_PASSWORD):

CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'YOUR_STRONG_PASSWORD';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
exit

Step 6 - Configure and Install the Panel

Copy the environment file and install PHP dependencies:

cd /var/www/pterodactyl
cp .env.example .env
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader

Generate the application key:

php artisan key:generate --force
Important: Back up your APP_KEY from .env. Losing it makes encrypted data irrecoverable.

Step 7 - Run the Interactive Setup

Run the built-in setup wizards:

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

Migrate and seed the database:

php artisan migrate --seed --force

Create the first admin user:

php artisan p:user:make

Step 8 — Set Correct Permissions

On Ubuntu/Debian (Nginx typically uses www-data):

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

Step 9 - Enable Cron + Queue Worker (Required)

Pterodactyl uses queues for background jobs. You must set up a cron entry and a systemd worker.

9.1 Add the cron job

sudo crontab -e

Add this line:

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

9.2 Create the systemd queue worker

nano /etc/systemd/system/pteroq.service

Paste:

[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 services:

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

Step 10 - Configure Nginx (Optional but Recommended)

Remove the default Nginx site:

sudo rm /etc/nginx/sites-enabled/default

Create the Panel site config:

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

Paste (replace YOUR_DOMAIN with your domain or server IP):

server {
    listen 80;
    server_name YOUR_DOMAIN;

    root /var/www/pterodactyl/public;
    index index.html index.htm index.php;
    charset utf-8;

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

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log  /var/log/nginx/pterodactyl.app-error.log error;

    client_max_body_size 100m;
    client_body_timeout 120s;

    sendfile off;

    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 PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTP_PROXY "";
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }

    location ~ /\.ht {
        deny all;
    }
}

Enable the site and restart Nginx:

sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
sudo systemctl restart nginx
Note: If you installed PHP 8.2 instead of 8.3, update the socket path to /run/php/php8.2-fpm.sock.

Step 11 - SSL (HTTPS) with Certbot (Optional)

Install Certbot + Nginx plugin:

sudo apt update
sudo apt install -y certbot
sudo apt install -y python3-certbot-nginx

Create a certificate (replace example.com with your domain):

sudo certbot certonly --nginx -d example.com

Auto-renew (recommended):

sudo crontab -e

Add:

0 23 * * * certbot renew --quiet --deploy-hook "systemctl restart nginx"

Access Your Panel

  • http://YOUR_SERVER_IP (HTTP)
  • https://YOUR_DOMAIN (if SSL is configured)

Power Your Pterodactyl Setup with Servers99 Dedicated Servers

Servers99 provides dedicated hardware built for reliable performance—ideal for installing Pterodactyl Panel and running game server workloads with full control.

  • Fast storage for quick deployments
  • Low-latency network connectivity
  • Full root access and OS flexibility
  • DDoS protection options

 Servers99 Dedicated Servers

Comments

Popular posts from this blog

Still on Shared Hosting in 2025? Why Your Australian Business is Hitting a Wall.

Why Every Digital Business Targeting Europe Should Host in Germany

VPS vs. Dedicated Servers: A Performance Analysis for Growing Businesses