### Install Core Dependencies and Generate Application Key Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Shell commands to copy the environment file, install Composer dependencies, and generate the application encryption key. The `key:generate` command should only be run on initial 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 ``` -------------------------------- ### Enable and Start Pterodactyl Queue Service (pteroq.service) Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started This command enables and starts the Pterodactyl Queue service (pteroq.service) on the system. It ensures that the Pterodactyl queue worker is configured to start automatically on machine boot and is running. This is the final step in making the queue worker operational. ```bash sudo systemctl enable --now pteroq.service ``` -------------------------------- ### Enable and Start Redis Server Service (RHEL/Rocky/AlmaLinux) Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started This command enables and starts the Redis server service on RHEL-based systems like Rocky Linux and AlmaLinux. It ensures that Redis is configured to start on boot and is running immediately. This is a prerequisite for the Pterodactyl queue worker if Redis is used for message brokering. ```bash sudo systemctl enable --now redis-server ``` -------------------------------- ### Install Pterodactyl Panel Dependencies (Ubuntu) Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Installs essential dependencies for the Pterodactyl Panel on Ubuntu systems. This includes adding necessary repositories for PHP and Redis, updating package lists, and installing PHP, MariaDB, NGINX, and other required tools. Ensure you have root access and consult your OS documentation for specific package names if needed. ```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 ``` -------------------------------- ### Install Composer (PHP Dependency Manager) Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Installs Composer, a PHP dependency manager, globally on the system. Composer is required for managing Pterodactyl Panel's code dependencies. This command downloads the installer and places the 'composer' executable in '/usr/local/bin'. ```bash curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer ``` -------------------------------- ### Database Connection Commands Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Commands to connect to MariaDB or MySQL databases as the root user. This is a prerequisite for setting up the Pterodactyl panel database. ```bash mariadb -u root -p ``` ```bash mysql -u root -p ``` -------------------------------- ### Configure Pterodactyl Queue Worker Service (systemd) Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started This configuration defines the systemd service for the Pterodactyl Panel's queue worker. It specifies the user, group, restart behavior, and the command to execute the queue worker with specific queues, sleep intervals, and retry attempts. This setup ensures the queue worker runs reliably in the background. ```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 ``` -------------------------------- ### Seed Pterodactyl Database with Tables and Nests/Eggs Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Artisan command to set up all necessary database tables and seed the Pterodactyl Panel with its core data, including Nests and Eggs. This command can take a significant amount of time to complete. ```bash php artisan migrate --seed --force ``` -------------------------------- ### Download and Prepare Pterodactyl Panel Files Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Downloads the latest release of the Pterodactyl Panel and prepares the necessary directories. It creates the panel's directory structure, downloads the compressed panel files, extracts them, and sets appropriate read/write permissions for storage and cache directories. This ensures the panel can store data and maintain performance. ```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/ ``` -------------------------------- ### Create First Administrative User Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Artisan command to create the initial administrative user for the Pterodactyl Panel. User passwords must meet specific requirements: 8 characters, mixed case, and at least one number. ```bash php artisan p:user:make ``` -------------------------------- ### Create Pterodactyl Database User and Grant Privileges Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started SQL commands to create a dedicated user for the Pterodactyl panel, create the panel database, and grant all necessary privileges to the user. Ensure 'yourPassword' is replaced with a strong, unique password. ```sql 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 ``` -------------------------------- ### Retrieve Pterodactyl Application Encryption Key Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Command to display the Pterodactyl application's encryption key (APP_KEY) from the .env file. This key is critical for data security and must be stored safely. ```bash grep APP_KEY /var/www/pterodactyl/.env ``` -------------------------------- ### Set Pterodactyl Panel File Permissions Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Commands to set the correct ownership for Pterodactyl Panel files, ensuring the webserver can access them. The specific user/group (e.g., `www-data`, `nginx`, `apache`) depends on the webserver and operating system distribution. ```bash # If using NGINX, Apache or Caddy (not on RHEL / Rocky Linux / AlmaLinux) chown -R www-data:www-data /var/www/pterodactyl/* # If using NGINX on RHEL / Rocky Linux / AlmaLinux chown -R nginx:nginx /var/www/pterodactyl/* # If using Apache on RHEL / Rocky Linux / AlmaLinux chown -R apache:apache /var/www/pterodactyl/* ``` -------------------------------- ### Configure Pterodactyl Environment Settings Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started CLI commands to configure Pterodactyl's core environment settings, including database credentials and mail sending options. The `p:environment:mail` command allows selection between PHP's internal mailer or a custom SMTP server. ```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 ``` -------------------------------- ### Create Pterodactyl Queue Worker Systemd Service Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Systemd service file content for managing the Pterodactyl queue worker process. This service ensures background tasks like email sending are processed. The file should be named `pteroq.service` and placed in `/etc/systemd/system`. ```systemd # Pterodactyl Queue Worker File # ---------------------------------- [Unit] Description=Pterodactyl Queue Worker After=redis-server.service [Service] # On some systems the user and group might be different. ``` -------------------------------- ### Configure Pterodactyl Task Scheduler Cronjob Source: https://pterodactyl.io/panel/1.11/panel/1.0/getting_started Cronjob configuration to run the Pterodactyl task scheduler every minute. This handles tasks like session cleanup and sending scheduled commands to daemons. The command should be added using `sudo crontab -e`. ```bash * * * * * php /var/www/pterodactyl/artisan schedule:run >> /dev/null 2>&1 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.