How to Insatall Pterodactyl Panel?

Installing Pterodactyl Panel on Ubuntu involves several steps, including setting up the necessary dependencies and configuring the panel. Here’s a general overview of the installation process:

  1. Update the system packages: Run the following command to update the package lists and upgrade any existing packages:
sudo apt update && sudo apt upgrade
  1. Install necessary dependencies: Pterodactyl Panel requires several dependencies, including Node.js, Git, and other packages. You can install them by running the following command:
sudo apt install curl tar unzip git wget gcc g++ make python2 python2-dev python3 python3-dev python3-pip
  1. Install Docker: Pterodactyl Panel uses Docker to manage the game servers. You can install it by following the official Docker installation guide for Ubuntu:

https://docs.docker.com/engine/install/ubuntu/

  1. Install Docker Compose: Docker Compose is used to manage the containers for the Pterodactyl Panel. You can install it by running the following commands:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
  1. Download and install Pterodactyl Panel: You can download the latest version of Pterodactyl Panel using the following command:
curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz

Extract the downloaded file to the desired location by running:

tar --strip-components=1 -xzvf panel.tar.gz

Then, navigate to the extracted directory and install the dependencies:

cd panel
sudo chmod -R 755 storage/* bootstrap/cache/
sudo chown -R www-data:www-data *
composer install --no-dev --optimize-autoloader
php artisan key:generate --force
php artisan p:environment:setup
php artisan p:environment:database
php artisan migrate --seed --force
  1. Set up Nginx: Pterodactyl Panel requires a web server to serve the web interface. You can use Nginx by creating a new server block in the /etc/nginx/sites-available/ directory with the following content:
 server {
    listen 80;
    server_name your-domain.com;
    root /var/www/pterodactyl/public;
    index index.php;
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }
    location ~ \.php$ {
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTP_PROXY "";
    }
    location ~ /\.ht {
        deny all;
    }
}

Replace your-domain.com with your own domain name and ensure that the fastcgi_pass line matches your version of PHP.

Then, create a symlink to enable the server block:

sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/
  1. Start the panel: Finally, you can start the panel using Docker Compose:
cd /var/www/pterodactyl
sudo docker-compose up -d

That’s it! You should now be able to access the Pterodactyl Panel by visiting your domain name

Leave a Reply

Your email address will not be published. Required fields are marked *