### Install Docker for Wings Daemon Source: https://context7.com/pterodactyl/documentation/llms.txt Installs Docker using a convenience script and enables the Docker service to start on boot. ```bash # Install Docker curl -sSL https://get.docker.com/ | CHANNEL=stable bash sudo systemctl enable --now docker ``` -------------------------------- ### Enable and Start Docker Service Source: https://github.com/pterodactyl/documentation/blob/master/wings/1.0/installing.md Enable Docker to start on boot and start the service immediately. This command is for systems using systemd. ```bash sudo systemctl enable --now docker ``` -------------------------------- ### Enable and Start Redis Server Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/getting_started.md Enable the Redis server to start on boot and start it immediately. This is often a prerequisite for the Pterodactyl queue worker. ```bash sudo systemctl enable --now redis-server ``` -------------------------------- ### Install System Dependencies and Repositories Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/panel/centos8.md Update the system, install EPEL and Remi repositories, enable PHP 8.3, and install core Pterodactyl dependencies including PHP, MariaDB, Nginx, and Redis. ```bash # Update system sudo dnf update -y # Install EPEL and Remi repository sudo dnf install -y epel-release # Add additional repositories for PHP (Enterprise Linux 8) sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm # Add additional repositories for PHP (Fedora Server 40) sudo dnf install -y https://rpms.remirepo.net/fedora/remi-release-40.rpm # Enable PHP 8.3 from Remi sudo dnf module reset php sudo dnf module enable php:remi-8.3 -y # Install dependencies sudo dnf install -y php php-common php-cli php-gd php-mysql php-mbstring php-bcmath php-xml php-fpm php-curl php-zip mariadb mariadb-server nginx redis zip unzip tar ``` -------------------------------- ### Start and Enable Services Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/panel/centos8.md Ensure MariaDB, Nginx, and Redis services are running and enabled to start on boot. ```bash sudo systemctl enable --now mariadb nginx redis ``` -------------------------------- ### Pterodactyl Core Dockerfile Example (Java) Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_image.md This Dockerfile is used for Pterodactyl Java environments. It specifies the base image, maintains the image, installs necessary packages, creates a 'container' user, sets environment variables, defines the working directory, and copies the entrypoint script. ```dockerfile # ---------------------------------- # Pterodactyl Core Dockerfile # Environment: Java # Minimum Panel Version: 0.6.0 # ---------------------------------- FROM openjdk:8-jdk-alpine MAINTAINER Pterodactyl Software, RUN apk add --no-cache --update curl ca-certificates openssl git tar bash sqlite fontconfig \ && adduser --disabled-password --home /home/container container USER container ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh CMD ["/bin/bash", "/entrypoint.sh"] ``` -------------------------------- ### Default Startup Command Example Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_image.md This is a typical example of a STARTUP environment variable passed to a container, often used for Java applications. ```bash STARTUP="java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}" ``` -------------------------------- ### Install Dependencies and Docker Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/wings/centos8.md Installs required packages, adds the Docker repository for CentOS 8 or Fedora 40, installs Docker, and enables the Docker service. ```bash # Install required packages sudo dnf install -y dnf-utils device-mapper-persistent-data lvm2 # Add Docker repository (Enterprise Linux 8) sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo # Add Docker repository (Fedora Server 40) sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo ## Install Docker sudo dnf install -y docker-ce docker-ce-cli containerd.io ## Enable Docker service systemctl enable --now docker ``` -------------------------------- ### Start and Enable PHP-FPM Service Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/panel/centos8.md Ensure the PHP-FPM service is running and enabled to start automatically on system boot. ```bash sudo systemctl enable --now php-fpm ``` -------------------------------- ### Install Dependencies and Generate Key Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/getting_started.md Copy the environment file, install Composer dependencies, and generate a new application encryption key. The `php artisan key:generate --force` command should only be run if this is a fresh installation. ```bash 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 ``` -------------------------------- ### Install Docker CE Source: https://github.com/pterodactyl/documentation/blob/master/wings/1.0/installing.md Use this command for a quick installation of Docker CE. Ensure you have curl installed. ```bash curl -sSL https://get.docker.com/ | CHANNEL=stable bash ``` -------------------------------- ### Default Startup Command Example Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_egg.md An example of a default startup command that utilizes environment variables for server memory and the server JAR file. This is a common pattern for Java-based servers. ```text java -Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}} ``` -------------------------------- ### Install System Dependencies and Repositories for Pterodactyl Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/panel/debian.md Installs essential packages, adds PHP and Redis repositories, and sets up the MariaDB repository. This prepares the system for Pterodactyl panel installation. ```bash # Install necessary packages apt install -y 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 (Debian 11 & 12) 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 (Debian 11 & 12) curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash # Update repositories list apt update # 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 System Dependencies and Pterodactyl Panel Source: https://context7.com/pterodactyl/documentation/llms.txt Installs necessary system packages, PHP extensions, Redis, and Composer. Downloads and unpacks the Pterodactyl Panel, installs PHP dependencies, and generates the application key. Ensure the APP_KEY is backed up securely. ```bash # Install system dependencies (Ubuntu/Debian example) apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php 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 apt update apt -y install php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb-server nginx tar unzip git redis-server # Install Composer curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer # Download and unpack 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/ # Install PHP dependencies and generate encryption key cp .env.example .env COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader php artisan key:generate --force # Save your APP_KEY — losing this means all encrypted data is permanently lost grep APP_KEY /var/www/pterodactyl/.env # Output: APP_KEY=base64:YOUR_LONG_RANDOM_STRING ``` -------------------------------- ### Install Panel Dependencies Source: https://github.com/pterodactyl/documentation/blob/master/community/customization/panel.md Installs Yarn globally and then installs the panel's build dependencies within the Pterodactyl directory. ```bash npm i -g yarn # Install Yarn cd /var/www/pterodactyl yarn # Installs panel build dependencies ``` -------------------------------- ### Example Wings Configuration for Mounts Source: https://github.com/pterodactyl/documentation/blob/master/guides/mounts.md An example of how to configure a specific directory for mounts in the Wings configuration file. This path and its subdirectories will be available for mounting. ```yaml allowed_mounts: - /var/lib/pterodactyl/mounts ``` -------------------------------- ### Define Server Start Completion String Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_egg.md Specify a string that indicates when a server has finished starting. The Daemon will mark the server as 'ON' once this string is detected in the output. ```json { "done": ")! For help, type " } ``` -------------------------------- ### Install SELinux Policy Packages Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/panel/centos8.md Install necessary packages for SELinux configuration if SELinux is enabled. Check status with `sestatus`. ```bash sudo dnf install -y policycoreutils selinux-policy selinux-policy-targeted setroubleshoot-server setools setools-console mcstrans ``` -------------------------------- ### Install SELinux Packages on CentOS 7 Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/panel/centos7.md Installs essential SELinux utilities if SELinux is enabled. Check status with `sestatus`. ```bash yum install -y policycoreutils policycoreutils-python selinux-policy selinux-policy-targeted libselinux-utils setroubleshoot-server setools setools-console mcstrans ``` -------------------------------- ### Install Pterodactyl Dependencies on CentOS 7 Source: https://github.com/pterodactyl/documentation/blob/master/community/installation-guides/panel/centos7.md Installs MariaDB, EPEL, Remi repositories, PHP 8.3, Nginx, Redis, and Composer. Enables and starts necessary services. ```bash sudo tee /etc/yum.repos.d/mariadb.repo < with your actual domain name. ```caddy { domain root * . file_server # enable gzip compress # Enable HTTP/2.0 protocols h1,h2,h2c # Set this path to your site's directory # The exact makefile path will depend on your installation location php_fastcgi unix//run/php/php8.1-fpm.sock # Prevent clients from accessing dot files @forbidden { path } respond @forbidden 404 # If you are using a subdomain, uncomment the following line # rewrite /api/* /index.php?::__rewrite_uri__ # If you are using a subdomain, uncomment the following line # rewrite / {. # to {path} # / {path}/ # index.html # } rewrite / /index.php?::__rewrite_uri__ } ``` -------------------------------- ### Apply SELinux Policy for Redis Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/troubleshooting.md Use these commands to generate and install an SELinux policy module for Redis when encountering permission errors. ```bash audit2allow -a -M redis_t semodule -i redis_t.pp ``` -------------------------------- ### Install Panel Dependencies on Ubuntu Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/getting_started.md Installs necessary packages for Pterodactyl Panel on Ubuntu, including PHP, MariaDB, NGINX, and Redis. Ensure you consult your OS's package manager for exact package names. ```bash # Add "add-apt-repository" command apt -y install software-properties-common curl apt-transport-https ca-certificates gnupg # Add additional repositories for PHP (Ubuntu 22.04) LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php # 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 # Update repositories list apt update # Install Dependencies apt -y install php8.3 php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip} mariadb-server nginx tar unzip git redis-server ``` -------------------------------- ### Update Composer Dependencies Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/legacy_upgrade.md After downloading the new files, upgrade the core panel components using Composer. Follow any prompts that appear during the installation. ```bash composer install --no-dev --optimize-autoloader ``` -------------------------------- ### Enter Maintenance Mode Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/updating.md Place the Panel into maintenance mode before starting the update process to prevent user errors and ensure a smooth update. ```bash cd /var/www/pterodactyl php artisan down ``` -------------------------------- ### Enable Telemetry via Artisan Command Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/additional_configuration.md Telemetry can be enabled non-interactively using the `php artisan p:environment:setup` command with the `--telemetry` flag. ```bash php artisan p:environment:setup --telemetry ``` -------------------------------- ### Download and Install Updated Wings Binary Source: https://github.com/pterodactyl/documentation/blob/master/wings/1.0/upgrading.md Download the latest Wings binary and make it executable. This process requires stopping the Wings service briefly, but running servers will not be affected. ```bash systemctl stop wings 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 ``` -------------------------------- ### Check PHP and Composer Versions Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/updating.md Verify that your system meets the minimum PHP 8.2 and Composer 2 requirements before proceeding with the panel update. If not, follow the PHP upgrade guide first. ```shell vagrant@pterodactyl:~/app$ php -v PHP 8.2.5 (cli) (built: Dec 21 2022 10:32:13) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.5, Copyright (c) Zend Technologies with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies vagrant@pterodactyl:~/app$ composer --version Composer version 2.3.5 2022-04-13 16:43:00 ``` -------------------------------- ### Base Image Declaration Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_image.md Specifies the base Docker image to use. This example uses an OpenJDK 8 image based on Alpine Linux for a smaller footprint. ```dockerfile FROM openjdk:8-jdk-alpine ``` -------------------------------- ### Start Wings in Debug Mode Source: https://github.com/pterodactyl/documentation/blob/master/wings/1.0/installing.md Run Wings in debug mode to monitor its startup process and identify any potential errors. This is useful for troubleshooting before daemonizing the service. ```bash sudo wings --debug ``` -------------------------------- ### Apply SELinux Policy for Wings HTTP Ports Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/troubleshooting.md Use these commands to generate and install an SELinux policy module for Wings HTTP ports when encountering connection errors. ```bash audit2allow -a -M http_port_t semodule -i http_port_t.pp ``` -------------------------------- ### Configure Caddyfile for DNS Challenge Source: https://github.com/pterodactyl/documentation/blob/master/tutorials/creating_ssl_certificates.md Add a 'tls' block within your domain configuration in the Caddyfile to specify DNS challenge settings. This example uses Cloudflare and expects the API token to be provided via an environment variable. ```caddyfile { # ... tls { dns cloudflare {env.CLOUDFLARE_API_TOKEN} } } ``` -------------------------------- ### Configure Server Properties and YAML Settings for Game Servers Source: https://context7.com/pterodactyl/documentation/llms.txt Define server properties and YAML configurations for game servers. This block mutates server.properties before container start and configures YAML settings. ```json // Egg: Configuration Files block // Mutates server.properties before container start { "server.properties": { "parser": "properties", "find": { "server-ip": "0.0.0.0", "enable-query": "true", "server-port": "{{server.build.default.port}}", "query.port": "{{server.build.default.port}}" } }, "config.yml": { "parser": "yaml", "find": { "listeners[0].query_enabled": true, "listeners[0].query_port": "{{server.build.default.port}}", "listeners[0].host": "0.0.0.0:{{server.build.default.port}}", "servers.*.address": { "127.0.0.1": "{{config.docker.interface}}", "localhost": "{{config.docker.interface}}" } } } } ``` -------------------------------- ### Apache Configuration with SSL Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/webserver_configuration.md This is the Apache configuration file for Pterodactyl when using SSL. Replace `` with your actual domain name. This configuration should be placed in `/etc/apache2/sites-available/pterodactyl.conf` or `/etc/httpd/conf.d/` on RHEL-based systems. Ensure `libapache2-mod-php8.3` is installed. ```apache ServerName Redirect "/" "https:///" ServerName DocumentRoot /var/www/pterodactyl/public # Enable mod_rewrite and mod_ssl RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) /index.php/$1 [L] # SSL Configuration SSLEngine on SSLCertificateFile /etc/letsencrypt/live//fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live//privkey.pem # PHP Configuration SetHandler "proxy:unix:/var/run/php/php8.3-fpm.sock|fcgi://localhost/" # Deny access to hidden files Require all denied Require all denied Require all denied Require all denied ``` -------------------------------- ### Enable Apache Configuration and Modules Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/webserver_configuration.md After creating the Apache configuration file, enable it, necessary modules, and restart the Apache service. On RHEL-based systems, these commands are not needed. ```bash # You do not need to run any of these commands on RHEL, Rocky Linux, or AlmaLinux sudo ln -s /etc/apache2/sites-available/pterodactyl.conf /etc/apache2/sites-enabled/pterodactyl.conf sudo a2enmod rewrite sudo a2enmod ssl sudo systemctl restart apache2 ``` -------------------------------- ### Create a New User with Artisan Source: https://github.com/pterodactyl/documentation/blob/master/community/tutorials/artisan.md Create a new user via the command line. Options can be provided directly, or the command will prompt interactively. ```bash php artisan p:user:make {--email=user@example.com} {--username=myusername} {--name-first=My} {--name-last=Name} {--password=supersecret} {--admin=1|0} {--no-password} ``` -------------------------------- ### Enable NGINX Pterodactyl Site and Restart Source: https://context7.com/pterodactyl/documentation/llms.txt Commands to create a symbolic link for the NGINX configuration and restart the NGINX service. ```bash sudo ln -s /etc/nginx/sites-available/pterodactyl.conf /etc/nginx/sites-enabled/pterodactyl.conf sudo systemctl restart nginx ``` -------------------------------- ### Configure S3 Backups Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/additional_configuration.md Enable the use of AWS S3 for storing backups by setting the backup driver and providing S3 credentials and bucket information. ```bash # Sets your panel to use s3 for backups APP_BACKUP_DRIVER=s3 # Info to actually use s3 AWS_DEFAULT_REGION= AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_BACKUPS_BUCKET= AWS_ENDPOINT= ``` -------------------------------- ### Changing File Permissions Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_image.md On Linux systems, you may need to make the entrypoint.sh file executable. Run this command in the directory where the file is located. ```bash chmod +x entrypoint.sh ``` -------------------------------- ### Create a New Location with Artisan Source: https://github.com/pterodactyl/documentation/blob/master/community/tutorials/artisan.md Add a new location to the panel. Requires a short code and an optional long description. ```bash php artisan p:location:make {--short=us1} {--long="A description of this location."} ``` -------------------------------- ### Configure Pterodactyl Panel Environment and Database Source: https://context7.com/pterodactyl/documentation/llms.txt Runs interactive Artisan commands to set up the Panel's environment, database connection, and email settings. After configuration, it runs database migrations and seeds default Nests/Eggs. Finally, it creates the first administrator user. ```bash # Interactive environment, database, and mail setup php artisan p:environment:setup php artisan p:environment:database php artisan p:environment:mail # select "smtp" for external SMTP, "mail" for PHP mail # Run migrations and seed default Nests & Eggs — do NOT exit early php artisan migrate --seed --force # Create the first admin user php artisan p:user:make # Prompts for: email, username, first name, last name, password, admin (yes/no) # Set correct file ownership (NGINX/Apache on Debian/Ubuntu) chown -R www-data:www-data /var/www/pterodactyl/* ``` -------------------------------- ### Executing the Modified Startup Command Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_image.md This line executes the startup command that has been modified to include the actual values for memory and jar file. ```bash ${MODIFIED_STARTUP} ``` -------------------------------- ### Create Let's Encrypt Directory Source: https://github.com/pterodactyl/documentation/blob/master/tutorials/creating_ssl_certificates.md Manually create the directory structure required by Let's Encrypt for storing certificates. This is a prerequisite for generating certificates. ```bash sudo mkdir -p /etc/letsencrypt/live/example.com ``` -------------------------------- ### Enable and Restart Nginx Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/webserver_configuration.md After creating the Nginx configuration file, enable it and restart the Nginx service. On RHEL-based systems, symlinking is not required. ```bash # 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 ``` -------------------------------- ### Stop and Start Wings Service Source: https://github.com/pterodactyl/documentation/blob/master/community/customization/wings.md Commands to manually stop and then start the Wings system service. These are often used in conjunction with debugging or troubleshooting steps. They may require root privileges. ```bash systemctl stop wings systemctl start wings ``` -------------------------------- ### Check Virtualization Type Source: https://github.com/pterodactyl/documentation/blob/master/wings/1.0/installing.md Run this command to determine the virtualization environment of your system. Avoid OpenVZ or LXC. ```bash sudo dmidecode -s system-manufacturer ``` -------------------------------- ### Accessing Environment Variables in Startup Command Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_egg.md Demonstrates how to access a custom environment variable within the server's startup command. The variable `WOOZLE_WOO` is accessed using `{{WOOZLE_WOO}}`. ```text {{WOOZLE_WOO}} ``` -------------------------------- ### Log in to MySQL/MariaDB Source: https://github.com/pterodactyl/documentation/blob/master/tutorials/mysql_setup.md Connect to the MySQL or MariaDB command line interface. You will be prompted for the root password. ```sql # If using MariaDB (v11.0.0+) mariadb -u root -p ``` ```sql # If using MySQL mysql -u root -p ``` -------------------------------- ### Get Help for a Specific Artisan Command Source: https://github.com/pterodactyl/documentation/blob/master/community/tutorials/artisan.md Retrieve detailed information about a specific Artisan command by replacing `` with the command name. ```bash php artisan help ``` -------------------------------- ### Configure server.properties File Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_egg.md Use this to configure the `server.properties` file for a server. It specifies the parser and defines key-value pairs to find and replace within the file. ```json { "server.properties": { "parser": "properties", "find": { "server-ip": "0.0.0.0", "enable-query": "true", "server-port": "{{server.build.default.port}}", "query.port": "{{server.build.default.port}}" } } } ``` -------------------------------- ### Configure YAML File with Wildcard Matching Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_egg.md This snippet demonstrates configuring a YAML file, using the 'yaml' parser and wildcard notation for advanced searching and replacing within nested structures. ```json { "config.yml": { "parser": "yaml", "find": { "listeners[0].query_enabled": true, "listeners[0].query_port": "{{server.build.default.port}}", "listeners[0].host": "0.0.0.0:{{server.build.default.port}}", "servers.*.address": { "127.0.0.1": "{{config.docker.interface}}", "localhost": "{{config.docker.interface}}" } } } } ``` -------------------------------- ### Verify Release with SSH Key Source: https://github.com/pterodactyl/documentation/blob/master/project/about.md Use this SSH public key to verify the authenticity of Pterodactyl Panel and Wings releases starting from v1.12.0. ```text ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID4jRyjZHLujJfeQPrEx3YY+0QUmdmfK9GF8rHe7rWSn ``` -------------------------------- ### Fix Redis SELinux Permissions Source: https://context7.com/pterodactyl/documentation/llms.txt Generate and install SELinux policy modules to resolve permission errors for Redis. This is typically needed on RHEL-based systems. ```bash # Fix Redis SELinux permission errors audit2allow -a -M redis_t semodule -i redis_t.pp ``` -------------------------------- ### Configure Pterodactyl Queue Worker Service Source: https://context7.com/pterodactyl/documentation/llms.txt This systemd service file configures the Pterodactyl queue worker. Ensure the user and paths match your installation. ```systemd [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 ``` -------------------------------- ### Restart Wings Service Source: https://github.com/pterodactyl/documentation/blob/master/community/customization/wings.md After installing the new binary, restart the Wings system service to apply the changes. This command may require root privileges. ```bash systemctl restart wings ``` -------------------------------- ### Download and Prepare Wings Binary Source: https://context7.com/pterodactyl/documentation/llms.txt Downloads the latest Wings binary, making it executable. It auto-detects the architecture (amd64 or arm64). ```bash # Download Wings binary (auto-detects amd64 or arm64) 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 ``` -------------------------------- ### Configure Panel Environment Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/getting_started.md Run these commands to configure essential aspects of the Pterodactyl Panel, including session drivers, caching, database credentials, and email sending methods. ```bash 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 ``` -------------------------------- ### Remove Default Caddy Configuration Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/webserver_configuration.md Removes the default Caddy configuration file to allow for a custom setup. This is a prerequisite for configuring Caddy with or without SSL. ```bash rm /etc/caddy/Caddyfile ``` -------------------------------- ### Perform Bulk Server Power Operations Source: https://github.com/pterodactyl/documentation/blob/master/community/tutorials/artisan.md Control the power state (start, stop, kill, restart) for multiple servers at once. You can specify servers by ID or by node. ```bash php artisan p:server:bulk-power {--servers=1,2,3} {--nodes=1,2,3} ``` -------------------------------- ### Configure Local Backups via Wings Source: https://context7.com/pterodactyl/documentation/llms.txt Sets the backup driver to 'wings' in the Panel's `.env` file and specifies the local backup directory in Wings' `config.yml`. ```bash # Local backups via Wings (default) APP_BACKUP_DRIVER=wings ``` ```yaml # Wings config.yml — set the local backup directory system: backup_directory: /var/lib/pterodactyl/backups ``` -------------------------------- ### Set Working Directory and Copy Entrypoint Source: https://github.com/pterodactyl/documentation/blob/master/community/config/eggs/creating_a_custom_image.md Sets the default working directory within the container to '/home/container' and copies the entrypoint script into the image. ```dockerfile WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh ``` -------------------------------- ### Disable Telemetry via Artisan Command Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/additional_configuration.md Telemetry can be disabled non-interactively using the `php artisan p:environment:setup` command with the `--telemetry=false` flag. ```bash php artisan p:environment:setup --telemetry=false ``` -------------------------------- ### Configure Wings config.yml Source: https://context7.com/pterodactyl/documentation/llms.txt Instructions to place the `config.yml` file into the correct directory. This file is essential for Wings to connect to the Panel. ```bash # Paste config.yml from Admin > Nodes > [Node] > Configuration tab # into /etc/pterodactyl/config.yml ``` -------------------------------- ### Caddyfile Configuration Without SSL Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/webserver_configuration.md Example Caddyfile configuration for Pterodactyl Panel without SSL enabled. Replace with your actual domain name and ensure ports are set to :80. ```caddy { domain :80 root * . file_server # enable gzip compress # Enable HTTP/1.1 protocols h1 # Set this path to your site's directory # The exact makefile path will depend on your installation location php_fastcgi unix//run/php/php8.1-fpm.sock # Prevent clients from accessing dot files @forbidden { path } respond @forbidden 404 # If you are using a subdomain, uncomment the following line # rewrite /api/* /index.php?::__rewrite_uri__ # If you are using a subdomain, uncomment the following line # rewrite / {. # to {path} # / {path}/ # index.html # } rewrite / /index.php?::__rewrite_uri__ } ``` -------------------------------- ### List All Artisan Commands Source: https://github.com/pterodactyl/documentation/blob/master/community/tutorials/artisan.md View all available Artisan commands by running this command in the terminal. ```bash php artisan list ``` -------------------------------- ### Configure Local Backups Source: https://github.com/pterodactyl/documentation/blob/master/panel/1.0/additional_configuration.md Set the panel to use local storage for backups via Wings. The backup destination is configured in Wings' `config.yml`. ```bash # Sets your panel to use local storage via Wings for backups APP_BACKUP_DRIVER=wings ```