Pterodactyl is a game server UI.
IT IS NOT WORTH IT
I FAILED AT INSTALLING THIS
IT IS NOT WORTH IT
JUST USE PUFFERPANEL PufferPanel
their documentation for installation is here: https://pterodactyl.io/panel/1.0/getting_started.html
first we install dependencies:
# Install necessary packages
apt -y install software-properties-common curl ca-certificates gnupg2 sudo lsb-release
# Add additional repositories for PHP
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
curl -fsSL https://packages.sury.org/php/apt.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/sury-keyring.gpg
# Add Redis official APT repository
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
# MariaDB repo setup script
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
# Install Dependencies
apt install -y php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb-server nginx tar unzip git redis-server
install composer ( php dependency manager )
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
make a directory for pterodactyl
mkdir -p /var/www/pterodactyl
cd /var/www/pterodactyl
curl down the files for 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/
now long into the db ( when it says “Enter Password:” it is asking you to set one )
mariadb -u root -p
and configure it ( change yourPassword to something else )
CREATE USER 'pterodactyl'@'127.0.0.1' IDENTIFIED BY 'yourPassword';
CREATE DATABASE panel;
GRANT ALL PRIVILEGES ON panel.* TO 'pterodactyl'@'127.0.0.1' WITH GRANT OPTION;
exit
do more configuring
cp .env.example .env
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
# Only run the command below if you are installing this Panel for
# the first time and do not have any Pterodactyl Panel data in the database.
php artisan key:generate --force
back up the APP_KEY in the .env file somewhere
next, we setup the php environment
php artisan p:environment:setup
php artisan p:environment:database
# To use PHP's internal mail sending (not recommended), select "mail". To use a
# custom SMTP server, select "smtp".
php artisan p:environment:mail
it wouldnt let me use a tommyhost.ing email for the mail bit so i just used my normal gmail.
i said url would be https://pterodactyl.tommyhost.ing
timezone EST
cache driver redis
session driver redis
queue driver redis
enable ui based settings editor
disable telemtry
redis host default
password none
port default
database host default
port default
name default
username default
password is the password we set earlier when we logged into mariadb
use smtp
host smtp.gmail.com
port 25
username [email protected]
password mygmailpassword
encryption : tls
email emails should originate from: [email protected]
name on those default
now
php artisan migrate --seed --force
do not exit that process until it completes cause bad things happen
now add new user
php artisan p:user:make
yes administrator
then
chown -R www-data:www-data /var/www/pterodactyl/*
now we have to make a cronjob for this
sudo crontab -eand type in
* * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1
now we create a systemd service for it
cd /etc/systemd/system
vi pteroq.servicethen paste in
# Pterodactyl Queue Worker File
# ----------------------------------
[Unit]
Description=Pterodactyl Queue Worker
After=redis-server.service
[Service]
# On some systems the user and group might be different.
# Some systems use `apache` or `nginx` as the user and group.
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
then
sudo systemctl enable --now redis-server
sudo systemctl enable --now pteroq.service
now we configure the webserver
remove the default
rm /etc/nginx/sites-enabled/default
now, we have to make stuff for certificates
mkdir /etc/certs
cd /etc/certs
openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj "/C=NA/ST=NA/L=NA/O=NA/CN=Generic SSL Certificate" -keyout privkey.pem -out fullchain.pemok so go
cd /etc/nginx/sites-available
vi pterodactyl.conf
and paste in
server {
# Replace the example 192.168.2.229 with your domain name or IP address
listen 80;
server_name 192.168.2.229;
return 301 https://$server_name$request_uri;
}
server {
# Replace the example 192.168.2.229 with your domain name or IP address
listen 443 ssl http2;
server_name 192.168.2.229;
root /var/www/pterodactyl/public;
index index.php;
access_log /var/log/nginx/pterodactyl.app-access.log;
error_log /var/log/nginx/pterodactyl.app-error.log error;
# allow larger file uploads and longer script runtimes
client_max_body_size 100m;
client_body_timeout 120s;
sendfile off;
# SSL Configuration - Replace the example 192.168.2.229 with your domain
ssl_certificate /etc/certs/fullchain.pem;
ssl_certificate_key /etc/certs/privkey.pem;
ssl_session_cache shared:SSL:10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
ssl_prefer_server_ciphers on;
# See https://hstspreload.org/ before uncommenting the line below.
# add_header Strict-Transport-Security "max-age=15768000; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header Content-Security-Policy "frame-ancestors 'self'";
add_header X-Frame-Options DENY;
add_header Referrer-Policy same-origin;
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;
include /etc/nginx/fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}final bit is symlinking pterodactyl and restarting nginx
# You do not need to symlink this file if you are using RHEL, Rocky Linux, or AlmaLinux.
sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf
# You need to restart nginx regardless of OS.
sudo systemctl restart nginx
now we just install wings
if you dont have docker installed and configured do that, but i do on my template, so im skipping that bit.
to install wings:
sudo 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")"
sudo chmod u+x /usr/local/bin/wings
cf tunnel pterodactyl.tommyhost.ing → https://localhost no tls verify
cf tunnel wings.tommyhost.ing → https://localhost:8080 no tls verify
login to pterodactyl as admin, hit little settings thing, make new location called test
make new node called test, and fill in how much memory and storage to give it
fqdn = pterodactyl.tommyhost.ing
create
then go to configuration and copy it, but change certificate location to /etc/certs :q