Pterodactyl is an open-source game server management panel built on PHP, React, and Go. Unlike traditional web control panels, Pterodactyl runs all game instances in isolated Docker containers, preventing resource starvation and protecting the host operating system from malicious game mods or exploits. This guide provides an end-to-end walkthrough for deploying both the web management Panel and the Wings node daemon on bare-metal Ubuntu servers, complete with database setup, web server configuration, SSL encryption, and security hardening.
What You'll Learn
Prerequisites & System Requirements
Step 1: System Preparation & Installing Dependencies
Step 2: Database and Caching Setup
Step 3: Downloading and Configuring Pterodactyl Panel
Step 4: Web Server & SSL Certificate Setup with Nginx
Frequently Asked Questions
Prerequisites & System Requirements
Before starting the installation, ensure your bare-metal server meets the following criteria:
-
Operating System: Clean install of Ubuntu 24.04 LTS or 22.04 LTS (64-bit).
-
Access Level: Direct root SSH access or a user account with full sudo privileges.
-
Hardware Specs: Minimum 2 GB RAM (4 GB+ recommended when running Panel and Wings on the same host).
-
Domain & DNS: A Fully Qualified Domain Name (FQDN), such as panel.yourdomain.com, with an A record pointing to your server's public IPv4 address.
-
Virtualization: KVM or Bare Metal (OpenVZ, LXC, and Virtuozzo are not supported by Docker without custom kernel flags).
Step 1: System Preparation & Installing Dependencies
-
Update the local system repositories and upgrade existing packages to ensure a clean base environment:
Bashsudo apt update && sudo apt upgrade -y sudo apt install -y software-properties-common curl ca-certificates gnupg tar unzip git lsb-release -
Add the official Ondřej Surý PHP repository to access the latest PHP packages and extensions:
Bashsudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php sudo apt update -
Install Nginx, MariaDB, Redis, and PHP 8.3 with all required extensions for Pterodactyl:
Bashsudo apt install -y nginx mariadb-server redis-server \ php8.3 php8.3-{cli,common,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip,intl,tokenizer} -
Verify that all essential services are enabled and active:
Bashsudo systemctl enable --now nginx mariadb redis-server php8.3-fpm -
Install Composer, the PHP dependency manager:
Bashcurl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer composer --version
Step 2: Database and Caching Setup
-
Run the security script for MariaDB to set a root password, remove anonymous users, and disable remote root logins:
Bashsudo mysql_secure_installation -
Log in to the MariaDB shell:
Bashsudo mariadb -u root -p -
Create the Pterodactyl database and a dedicated user restricted to local connections:
SQLCREATE DATABASE panel; CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'SelectAStrongPasswordHere'; GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1'; FLUSH PRIVILEGES; EXIT; -
Verify that Redis caching is working by running a ping test:
Bashredis-cli ping # Expected output: PONG
Step 3: Downloading and Configuring Pterodactyl Panel
-
Create the web root directory for the Panel and navigate into it:
Bashsudo mkdir -p /var/www/pterodactyl cd /var/www/pterodactyl -
Download and extract the latest release archive from GitHub:
Bashsudo 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 -
Copy the example environment configuration file and install PHP dependencies:
Bashsudo cp .env.example .env sudo COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader sudo php artisan key:generate --forceCrucial Backup Step: Save your generated APP_KEY from
/var/www/pterodactyl/.envin a secure location off-site. Losing this key makes encrypted data unrecoverable. -
Run Pterodactyl's interactive configuration wizards:
Bashsudo php artisan p:environment:setup sudo php artisan p:environment:database sudo php artisan p:environment:mail -
Run database migrations to initialize tables and default data, then create your administrative account:
Bashsudo php artisan migrate --seed --force sudo php artisan p:user:make -
Grant ownership of the files to the web server user:
Bashsudo chown -R www-data:www-data /var/www/pterodactyl/*
Step 4: Web Server & SSL Certificate Setup with Nginx
-
Create a new Nginx site configuration file:
Bashsudo nano /etc/nginx/sites-available/pterodactyl.conf -
Paste the following configuration block, replacing
panel.yourdomain.comwith your domain:Nginxserver { listen 80; server_name panel.yourdomain.com; root /var/www/pterodactyl/public; index index.php; client_max_body_size 100m; client_body_timeout 120s; sendfile off; 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 $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; } }
Frequently Asked Questions
Can I use virtualization like OpenVZ for Pterodactyl?
OpenVZ, LXC, and Virtuozzo are not supported by Docker without custom kernel flags. KVM or Bare Metal is required.
Do I need a domain name to install Pterodactyl?
Yes, a Fully Qualified Domain Name (FQDN) like panel.yourdomain.com with an A record pointing to your server is required for SSL termination and secure communication.
What are the minimum hardware requirements for Pterodactyl?
A minimum of 2 GB RAM is required, but 4 GB or more is highly recommended when running both the management Panel and the Wings daemon on the same host.
iDatam Recommended Tutorials
Control Panel
How to Fix Invalid cPanel License Error?
Find out how to fix the Invalid cPanel License error with this step-by-step guide. Resolve licensing issues quickly and get your hosting control panel back on track.
Control Panel
How to Install and Use JetBackup in cPanel
Learn how to install and use JetBackup in cPanel with this step-by-step tutorial. Discover how to back up and restore accounts, files, databases, and more efficiently.
Network
Remote Desktop Can’t Connect To The Remote Computer [Solved]
Learn how to fix the Remote Desktop can't connect to the remote computer error. Discover common causes such as network problems, Windows updates, and firewall restrictions, along with step-by-step solutions to resolve the issue and restore your remote desktop connection.
Discover iDatam Dedicated Server Locations
iDatam servers are available around the world, providing diverse options for hosting websites. Each region offers unique advantages, making it easier to choose a location that best suits your specific hosting needs.