2021-03-05 10:12:51 -07:00

3.1 KiB

Upgrading 1.0 Series

This documentation covers the process for upgrading within the 1.X series of releases. This means upgrading from — for example — 1.0.3 to 1.1.0. Do not use this guide for upgrading from 0.7.

Check your PHP version

::: danger PHP Version Requirements Have Changed Panel@1.3.0 requires PHP 7.4 or PHP 8, PHP 7.3 is no longer supported. If you are still using PHP 7.3, please see the PHP upgrade guide. :::

Please ensure you are on PHP 7.4 or PHP 8 before continuing with the upgrade process, you may check your PHP version by running php -v.

If you are not on PHP 7.4 or PHP 8, please see the PHP upgrade guide.

This upgrade also requires composer v2, which is also covered by the PHP upgrade guide.

Fetch Updated Files

The first step in the update process is to download the new panel files from GitHub. The command below will download the release archive for the most recent version of Pterodactyl and save it in the current directory. Now is a good time to ensure that you're in the /var/www/pterodactyl directory as the command below will automatically unpack the archive into your current folder.

::: danger Panel@1.3.0 requires Wings@1.3.0 in order to work properly! :::

curl -L https://github.com/pterodactyl/panel/releases/latest/download/panel.tar.gz | tar -xzv

Once all of the files are downloaded we need to set the correct permissions on the cache and storage directories to avoid any webserver related errors.

chmod -R 755 storage/* bootstrap/cache

Update Dependencies

After you've downloaded all of the new files you will need to upgrade the core components of the panel. To do this, simply run the commands below and follow any prompts.

composer install --no-dev --optimize-autoloader

Clear Compiled Template Cache

You'll also want to clear the compiled template cache to ensure that new and modified templates show up correctly for users.

php artisan view:clear
php artisan config:clear

Database Updates

You'll also need to update your database schema for the newest version of Pterodactyl. Running the command below will update the schema and ensure the default eggs we ship are up to date (and add any new ones we might have). Just remember, never edit core eggs we ship! They will be overwritten by this update process.

php artisan migrate --seed --force

Set Permissions

The last step 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 nginx, apache, or even nobody.

# If using NGINX or Apache (not on CentOS):
chown -R www-data:www-data *

# If using NGINX on CentOS:
chown -R nginx:nginx *

# If using Apache on CentOS
chown -R apache:apache *

Restarting Queue Workers

After every update you should restart the queue worker to ensure that the new code is loaded in and used.

php artisan queue:restart