Pterodactyl Panel makes use of Composer to install dependencies and get everything setup and running for you. In order to use composer, you will first need to install it.
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Pterodactyl Panel will automatically configure your database for you. You will need to have connection details on hand, as well as create an empty database for the panel to install to.
Once you have composer installed you only need to run one command to have the panel run through the installation and setup process.
cp .env.example .env composer install --no-dev
When you run the command above it will begin by installing all of the dependencies required by the panel into the
We then need to generate an application encryption key using the command below. You should only run this command once when installing the Panel.
php artisan key:generate --force
The key you generated with the above command should never be disclosed to others, and you should store a secure copy of that key off-site in a secure manner. If you ever need to reinstall the Panel or migrate to a new server you will need to continue using this key to avoid losing encrypted information in the database.
You will need an existing MySQL database and non-root user to continue with the installation. Please see our Setting Up MySQL tutorial for how to do this if you are unsure.
The next thing we need to do is get our environment setup for the panel. To do this, run the commands below and follow the prompts.
php artisan p:environment:setup php artisan p:environment:database
After you've configured the environment, we need to configure email handling. To do that, enter the command below and follow the prompts. If you would like to use PHP's
mail() function simply select the
php artisan p:environment:mail
We can now setup the database. This is an automatic process that only requires you enter the command below.
php artisan migrate
This command will ask if you are sure you want to continue on a live environment, tell it yes.
Once the database is setup we then need to seed the database with nest information. To do so, run the command below.
php artisan db:seed
Finally, we need to create an admin account on the system. Run the command below and follow the prompts to do so.
php artisan p:user:make
Passwords for the user must include mixed case, at least one number, and at least 8 characters. The script will fail otherwise.
The last step here is to set the proper owner of the files to be the user that runs your webserver. In most cases this is
www-data but can vary from system to system — sometimes being
chown -R www-data:www-data * # If using CentOS do: chown -R nginx:nginx *
chown -R www-data:www-data * # If using CentOS do: chown -R apache:apache *
Next we need to setup queues to handle email and server task processing.