TürkiyeVPS

How to Install Pterodactyl Panel on Ubuntu 24.04: Game Server Panel Guide

Manage Minecraft, CS2, Rust and other game servers from your browser with the free, open-source Pterodactyl panel. We walk through installing the panel, MariaDB, Redis, Nginx + SSL and Wings (Docker) on Ubuntu 24.04 step by step.

8 min read

Managing several game servers one by one over SSH gets tiring fast. Pterodactyl is a free, open-source panel that lets you create and start game servers from your browser, watch their console, edit their files and give friends limited access. Every game server runs in its own Docker container, so servers don't affect each other. In this guide we install the panel and Wings on the same Ubuntu 24.04 server.

Quick summary: Pterodactyl has two parts. The Panel is the PHP web interface (it needs MariaDB, Redis and Nginx). Wings is the service that runs game servers in Docker containers. Both can run on the same machine. Start with a domain (for example panel.example.com), your own IPv4 address and at least 2 GB of RAM, then add what your game servers need.

Before you start

  • Server: Ubuntu 24.04, root access and a virtual server that can run Docker.
  • Public IP: To reach the panel from a browser and let players connect directly to game servers, the server needs its own public IPv4 address.
  • Domain: The connection between the Panel and Wings is protected with SSL, so you need a subdomain pointing to the server's IP. Create an A record for panel.example.com in DNS. We explain A records in What is DNS?
  • RAM: The panel, database and Wings together use about 1 GB. Add what your game servers need on top: for example 2-4 GB for a Minecraft server.

1. Install the required packages

Connect to your server over SSH and update the system. Ubuntu 24.04 ships PHP 8.3 in its own repositories:

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

Install Composer, the PHP package manager:

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

2. Download the panel files

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/

3. Create the database

Connect to MariaDB and create a database and user for the panel:

sudo mariadb
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'AStrongPassword';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
EXIT;

Replace AStrongPassword with your own strong password and note it down; you'll be asked for it in the next step.

4. Configure the panel

Create the environment file, install dependencies and generate the encryption key:

cd /var/www/pterodactyl
sudo cp .env.example .env
sudo COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
sudo php artisan key:generate --force

Important: back up the APP_KEY value from the .env file somewhere safe. If this key is lost, encrypted data in the panel cannot be recovered.

Then run the interactive setup commands:

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

The first command asks for the panel URL; enter https://panel.example.com. Choose redis for cache, sessions and queue. In the second command enter the database details from step 3. You can skip mail for now. Then create the database tables and the first admin account:

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

Finally, make the web server user the owner of the files:

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

5. Scheduler and queue worker

Add a line to root's crontab for the panel's scheduled tasks (sudo crontab -e):

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

Create a queue worker service for background jobs:

sudo nano /etc/systemd/system/pteroq.service
[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

6. Nginx and SSL

Remove the default site and create a site file for the panel:

sudo rm /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-available/pterodactyl.conf
server {
    listen 80;
    server_name panel.example.com;
    root /var/www/pterodactyl/public;
    index index.php;
    client_max_body_size 100m;

    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 PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_read_timeout 300;
    }

    location ~ /\.ht {
        deny all;
    }
}
sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
sudo nginx -t && sudo systemctl reload nginx

Get a free Let's Encrypt certificate; Certbot switches the Nginx config to HTTPS by itself:

sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d panel.example.com

For details see our Nginx and Let's Encrypt SSL guide. You can now log in at https://panel.example.com with the admin account from step 4.

7. Install Wings

Wings runs game servers in Docker containers. To install Docker from its official repository, follow our Docker on Ubuntu 24.04 guide or use Docker's install script:

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

Download the Wings binary:

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

8. Connect the panel to Wings (Location and Node)

Open the admin area in the panel:

  1. Locations → Create New: create a location, for example with the short code ist.
  2. Nodes → Create New: give it a name, select the location, enter panel.example.com as the FQDN and tick Communicate Over SSL. In total memory and disk, enter how much you want to allocate to game servers. The daemon port defaults to 8080 and the SFTP port to 2022.
  3. After saving the node, copy the settings from the Configuration tab and paste them into /etc/pterodactyl/config.yml on the server.

Try Wings in debug mode first:

sudo wings --debug

If there are no errors, stop it with Ctrl+C and create a permanent service:

sudo nano /etc/systemd/system/wings.service
[Unit]
Description=Pterodactyl Wings
After=docker.service
Requires=docker.service
PartOf=docker.service

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

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

When the heart icon next to the node in the Nodes list turns green, the connection is working.

9. Port allocations and your first game server

Game servers use the IP and port pairs (allocations) you assign to the node. On the node page, open the Allocation tab and add your server's public IP and the ports you'll use; for example 25565 for Minecraft and 27015 for CS2.

Then create a server under Servers → Create New: choose the owner, node, port, RAM/disk limits and the Nest/Egg (game template). Pterodactyl ships with templates for Minecraft (Paper, Vanilla, Forge), Source games and Rust, and you can import community templates too. Once installation finishes, you can start the server from the panel, watch its console and manage its files.

10. Firewall

The panel, Wings, SFTP and game ports need to be open:

sudo ufw allow OpenSSH
sudo ufw allow 80,443/tcp
sudo ufw allow 8080/tcp
sudo ufw allow 2022/tcp
sudo ufw allow 25565
sudo ufw enable

Repeat the last line for your own game ports. Remember that ports published by Docker can bypass UFW rules; details are in our Docker guide. For general hardening, see our Linux server security guide. Turning on two-factor authentication for the panel admin account is also recommended.

TürkiyeVPS servers for Pterodactyl

Pterodactyl's real job is running game servers, so your own IPv4 address and dedicated CPU matter. Our game server plans run in Istanbul on an Intel Core i5-10400F with dedicated vCPU, guaranteed RAM, 60–100 GB disk, your own IPv4 address, unmetered speed, 3 TB of traffic per month and root access. For the panel and one small game server, Oyun VDS 2 with 4 GB RAM fits; to run several servers together, Oyun VDS 3 or Oyun VDS 4 with 8 GB RAM. If you need more memory, the VDS Enterprise plans with their own IPv4 address are on our VDS plans page. Our standard VPS plans don't include a dedicated public IPv4 address, so they are not suitable for Pterodactyl. Payment is accepted in USDT (TRC20). For setups without a panel, see our Minecraft server and Valheim server guides.

Frequently Asked Questions

Is Pterodactyl free?

Yes. Pterodactyl is open source with no license fee. You only pay for the machine that runs the panel and game servers.

Can the Panel and Wings run on the same server?

Yes, that's how we set it up in this guide. When you run many game servers you can install Wings on more machines and manage them all from one panel; each extra machine becomes a separate node.

How much RAM does Pterodactyl need?

The panel, MariaDB, Redis and Wings together use about 1 GB. The total depends on your game servers: with one small Minecraft server, 4 GB is a comfortable start; for several servers you need 8 GB or more.

The node's heart is red and the panel can't reach Wings. What should I do?

Check the output of sudo systemctl status wings and sudo wings --debug. The most common causes are a closed 8080/TCP port, an incompletely copied config.yml, and SSL being enabled on the node without a certificate for the domain. Also check that the FQDN points to the server's IP.

The game server starts but players can't connect. Why?

Make sure the Allocation tab uses the server's public IP and that the port is open in the firewall (TCP and/or UDP depending on the game). Players can't connect directly to servers behind a shared (NAT) IP.