Aggiornare Pterodactyl da 1.x a 2.x

Qualsiasi cosa inseritela qui
Post Reply
User avatar
Matteo
Admin
Admin
Posts: 60
Joined: Friday 5 November 2021, 11:10

Aggiornare Pterodactyl da 1.x a 2.x

#Upgrade Steps

#Enter Maintenance Mode

Code: Select all

cd /var/www/pterodactyl
php artisan down
systemctl stop pteroq
#Back Up Your Panel

Code: 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.gz
#Then copy your .env file from 1.x. You do not need to change it:

Code: Select all

cp /var/www/pterodactyl/.env /var/www/pterodactyl-2.0/.env

Code: 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_modules

Code: Select all

COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --optimize-autoloader
#Migrate the Database

Code: Select all

php artisan down
php artisan migrate --force
#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:

Code: Select all

php artisan db:seed --force
#Switch to 2.0

Code: 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 pteroq
#Exit Maintenance Mode

Code: Select all

php artisan up
Post Reply