Skip to content

Loading…

← Back to Blog Game Servers

Install Pterodactyl on Ubuntu 24.04: Panel and Wings

By Hoststack Team·Nov 2026·5 min read

Pterodactyl is a free, open-source game server panel. The Panel is the web interface where you create servers and users; Wings is the daemon that runs each game server in its own Docker container. This guide installs both on a single Ubuntu 24.04 VPS, which is the simplest setup for one machine. Every command runs as root.

What you need

  • A KVM VPS with Ubuntu 24.04. Wings runs game servers in Docker, which needs full virtualisation. HostStack Game VPS and Linux VPS plans are KVM.
  • At least 4 GB RAM if the Panel and game servers share the machine. The Panel itself is light; your game servers decide the real memory need.
  • A domain or subdomain, for example panel.example.com, with an A record pointing to the VPS IP. Let's Encrypt needs it to issue a certificate.

1. Install PHP 8.3, MariaDB, Redis and Nginx

Ubuntu 24.04 ships PHP 8.3 in its own repositories, so no extra PPA is needed.

apt update && apt -y upgrade
apt -y install php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} \
  mariadb-server nginx redis-server tar unzip git curl
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

2. Download the Panel

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/

3. Create the database

Pick a strong password and keep it for the next step.

mariadb -u root
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'change-this-password';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
EXIT;

4. Configure the Panel

The setup commands ask for your panel URL, timezone, cache and session drivers (choose Redis), database details and mail settings. The last command creates your first admin user.

cp .env.example .env
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
php artisan key:generate --force
php artisan p:environment:setup
php artisan p:environment:database
php artisan p:environment:mail
php artisan migrate --seed --force
php artisan p:user:make
chown -R www-data:www-data /var/www/pterodactyl/*

Add the scheduler to root's crontab with crontab -e:

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

Then create the queue worker as /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
StartLimitInterval=180
StartLimitBurst=30
RestartSec=5s

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

5. SSL certificate and Nginx

apt -y install certbot python3-certbot-nginx
certbot certonly --nginx -d panel.example.com
rm /etc/nginx/sites-enabled/default

Create /etc/nginx/sites-available/pterodactyl.conf, replacing panel.example.com with your domain:

server {
    listen 80;
    server_name panel.example.com;
    return 301 https://$server_name$request_uri;
}

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

    ssl_certificate /etc/letsencrypt/live/panel.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/panel.example.com/privkey.pem;

    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 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;
    }
}
ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
nginx -t && systemctl restart nginx

Open https://panel.example.com and log in with the admin user you created.

6. Install Docker and Wings

curl -sSL https://get.docker.com/ | CHANNEL=stable bash
systemctl enable --now docker
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")"
chmod u+x /usr/local/bin/wings

In the Panel, open Admin → Locations and create a location, then Admin → Nodes → Create New. Use your domain as the FQDN and choose SSL, since the certificate from step 5 is already on this machine. On the node's Configuration tab, copy the generated config into /etc/pterodactyl/config.yml, then run Wings once in the foreground to check it connects:

wings --debug

When the node shows a green heart in the Panel, stop it with Ctrl+C and run it as a service, /etc/systemd/system/wings.service:

[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
systemctl enable --now wings

7. Open the firewall

The Panel needs ports 80 and 443, Wings uses 8080 for its API and 2022 for SFTP, and each game server needs the ports you allocate to it on the node (25565 for Minecraft, 30120 for FiveM, for example).

ufw allow OpenSSH
ufw allow 80,443,8080,2022/tcp
ufw allow 25565/tcp        # example: one Minecraft allocation
ufw enable

Common problems

  • Node heart stays red: check that port 8080 is open and that the FQDN in the node settings matches the certificate name.
  • Servers fail to install: run wings --debug and read the output; Docker must be running and the node must have free allocations.
  • Panel shows a 500 error: check /var/www/pterodactyl/storage/logs and that the files are owned by www-data.

Run Pterodactyl on a Game VPS

KVM, NVMe SSD, a dedicated IPv4 address and DDoS protection, with full root access for Docker and Wings.

See Game VPS plans

Deploy today

Online in 60 seconds. Supported around the clock.

Hosting, VPS and game servers across Mumbai, Delhi, Singapore, Germany, France & the USA — INR billing, GST invoices, and code APEX20 for 20% off your first order.

5,000+ customers served
99.9% uptime SLA
<8ms ping within Mumbai
24/7 expert support
WhatsApp Discord