Installing Pterodactyl Panel

Step-by-Step Installation Guide

Step 1: Update & Install Essentials

sudo apt update && sudo apt upgrade -y
sudo apt install sudo curl wget -y

Step 2: Install PHP & Required Packages

sudo apt install php8.0 php8.0-fpm php8.0-cli php8.0-mysql php8.0-xml php8.0-mbstring php8.0-curl php8.0-zip -y

Step 3: Install Composer

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

Step 4: Install MySQL or MariaDB

sudo apt install mysql-server -y
# or
sudo apt install mariadb-server -y

Step 5: Create Database

mysql -u root -p
# Inside MySQL shell:
CREATE DATABASE pterodactyl;
CREATE USER 'pterodactyl'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON pterodactyl.* TO 'pterodactyl'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 6: Download Pterodactyl Panel

cd /var/www/
sudo git clone https://github.com/pterodactyl/panel.git pterodactyl

Step 7: Install Dependencies

cd /var/www/pterodactyl
composer install --no-dev --optimize-autoloader

Step 8: Configure Environment File

cp .env.example .env
sudo nano .env
# Edit the .env file to set your database credentials and other settings

Step 9: Generate Application Key

php artisan key:generate --force

Step 10: Run Migrations

php artisan migrate --seed --force

Step 11: Set Up Web Server (Nginx Example)

# Create and configure Nginx site configuration file:
sudo nano /etc/nginx/sites-available/pterodactyl
# Add server block for Pterodactyl and enable site:
sudo ln -s /etc/nginx/sites-available/pterodactyl /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Step 12: Set Permissions

sudo chown -R www-data:www-data /var/www/pterodactyl/*
sudo chmod -R 755 /var/www/pterodactyl/storage /var/www/pterodactyl/bootstrap/cache

Step 13: Access the Panel

# Use ngrok or your server's domain/IP to access the panel:
ngrok http 80
Back to Docs Simplified Pterodactyl API Guide