Aggiornare Pterodactyl da 1.x a 2.x
Posted: Tuesday 6 October 2026, 14:25
#Upgrade Steps
#Enter Maintenance Mode
#Back Up Your Panel
#Download 2.0
#Then copy your .env file from 1.x. You do not need to change it:
#Install Dependencies
#Migrate the Database
#In 1.x, updates also ran the database seeder to update the default eggs. This is optional in 2.0. To update the default eggs, run:
#Switch to 2.0
#Finally, clear the caches and restart PHP and the queue worker:
#Exit Maintenance Mode
#Enter Maintenance Mode
Code: Select all
cd /var/www/pterodactyl
php artisan down
systemctl stop pteroqCode: Select all
/usr/bin/mariadb-dump --single-transaction --routines --triggers panel > /root/panel-1.x.sql
cp /var/www/pterodactyl/.env /root/panel-1.x.env
tar -czf /root/panel-1.x-files.tar.gz -C /var/www pterodactyl#Download 2.0
Code: Select all
mkdir /var/www/pterodactyl-2.0
cd /var/www/pterodactyl-2.0
curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/archive/refs/heads/2.0-develop.tar.gz
tar -xzf panel.tar.gz --strip-components=1
rm panel.tar.gzCode: Select all
cp /var/www/pterodactyl/.env /var/www/pterodactyl-2.0/.envCode: Select all
mkdir -p storage/framework/{cache/data,sessions,views} storage/logs storage/app/private bootstrap/cache var extensions public/assets/extensions
chmod -R 755 storage/* bootstrap/cache/#Install Dependencies
Code: Select all
apt remove -y nodejs npm
apt autoremove -y
apt --fix-broken install -y
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt update
apt install -y nodejs
apt install npm
npm ci
npm run build:production
rm -rf node_modulesCode: Select all
COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloaderCode: Select all
php artisan down
php artisan migrate --forceCode: Select all
php artisan db:seed --forceCode: Select all
chown -R www-data:www-data /var/www/pterodactyl-2.0
mv /var/www/pterodactyl /var/www/pterodactyl-1.x
mv /var/www/pterodactyl-2.0 /var/www/pterodactyl#Finally, clear the caches and restart PHP and the queue worker:
Code: Select all
cd /var/www/pterodactyl
php artisan optimize:clear
systemctl restart php8.3-fpm
systemctl start pteroqCode: Select all
php artisan up