Step-by-Step Guide: Setting Up Pterodactyl Panel on Ubuntu

10 min readBy Manas, HeavenCloud

Pterodactyl is a free, open-source game server management panel built on PHP, React, and Go. It runs all game servers inside isolated Docker containers while providing a clean web interface for console access, file management, and server administration.

Prerequisites

Before starting, ensure you have:

  • An Ubuntu 22.04 or 24.04 LTS KVM VPS (like HeavenCloud India or US VPS with root access)
  • At least 2 GB RAM (4 GB+ recommended for running games alongside the panel)
  • A domain or subdomain pointed to your server's public IPv4
  • Ports 80, 443, and 8080 open

Step 1: Server Preparation

First, update your package list and install basic utilities:

bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl tar unzip git redis-server software-properties-common

Step 2: Install PHP & Dependencies

Pterodactyl requires PHP 8.2 or 8.3 along with several extensions:

bash
sudo add-apt-repository -y ppa:ondrej/php
sudo apt update
sudo apt install -y php8.2 php8.2-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip}

Install Composer globally:

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

Step 3: Configure MySQL / MariaDB

Install MariaDB server:

bash
sudo apt install -y mariadb-server
sudo mysql_secure_installation

Create the database and a dedicated user:

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

Step 4: Download and Install Pterodactyl Panel

Create the web root directory and extract the latest release:

bash
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/

Copy the environment file and install dependencies:

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

Configure your database and mail settings:

bash
php artisan p:environment:setup
php artisan p:environment:database
php artisan migrate --seed --force
php artisan p:user:make

Set web server permissions:

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

Step 5: Configure Nginx & SSL

Install Nginx and Certbot for Let's Encrypt SSL:

bash
sudo apt install -y nginx certbot python3-certbot-nginx
sudo certbot certonly --nginx -d panel.yourdomain.com

Configure the Nginx virtual host at /etc/nginx/sites-available/pterodactyl.conf and restart Nginx:

bash
sudo systemctl restart nginx

Step 6: Install and Configure Wings

Pterodactyl Wings is the backend daemon written in Go that connects with Docker to manage individual server instances.

Install Docker:

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

Install Wings:

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

Generate your node configuration in the Pterodactyl admin area, paste the generated YAML into /etc/pterodactyl/config.yml, and start Wings:

bash
sudo systemctl enable --now wings

Summary

You now have a fully functional Pterodactyl Panel and Wings node ready to deploy Minecraft, Discord bots, Lavalink, and custom game daemons.

For pre-configured, DDoS-protected game hosting with 0 manual installation hassle, check out HeavenCloud Game Hosting.

  • Free 24/7 bot hosting
  • No credit card needed
  • Deploy in minutes
  • 12-hour money-back guarantee
  • DDoS protection included
  • Paid plans from ₹20/mo

Ready to host on the fastest cloud?

Launch a Discord bot, Lavalink node, game server or VPS in minutes. Start with free 24/7 bot hosting, no credit card needed. Questions? Our team answers 24/7 on Discord.