Skip to content

Instantly share code, notes, and snippets.

@trenutoo
Last active January 31, 2025 16:26
Show Gist options
  • Save trenutoo/c18258658bef28e73b24d11d02d24915 to your computer and use it in GitHub Desktop.
Save trenutoo/c18258658bef28e73b24d11d02d24915 to your computer and use it in GitHub Desktop.
Pterodactyl panel and wings migration

Pterodactyl Migration

Migrating panel

  1. Backup your hidden .env file containing the decryption APP_KEY from /var/www/pterodactyl

  1. Export the database, in this case ours is named panel

    mysqldump -u root -p --opt panel > /var/www/pterodactyl/panel.sql

    The .sql file would be saved in the /var/www/pterodactyl/ folder.


  1. Follow the panel installation documentation to install the panel on your new server.

  1. Transfer the panel.sql file to your new server and import the database. Make sure you're in the folder containing your .sql dump when performing the commands.

    mysql -u root -p panel < panel.sql

  2. After this, transfer your old .env file to the /var/www/pterodactyl location to complete the panel migration.

Migrating Wings

  1. Follow the Wings installation documentation to install Wings on your new machine.

  1. Once new Wings are configured, migrate all your volumes from your old machine to the new one. By default, the path would be /var/lib/pterodactyl/volumes/. Check your Wings config.yml for your configured data path.

Updating allocations

After the migration of volumes is done, you must update all the allocations since your IP most likely has changed.

Type hostname -I | awk '{print $1}' on your Wings machine to retrieve the IP. After that, login to your Panel machine to modify the database.

In the example below, we assume that the database name is panel. Replace newipherewith the IP returned from the hostname command above while oldiphere with the IP of your old allocation.

mysql -u root -p
UPDATE panel.allocations SET ip = 'newiphere' WHERE ip = 'oldiphere';
exit
@xyEmil
Copy link

xyEmil commented Jul 26, 2024

Did this, but when I try logging in, it just loads.

@AndyIsHereBoi
Copy link

Did this, but when I try logging in, it just loads.

just did it again and it works fine

@LavishSphere
Copy link

is there a way to migrate databases on a node to another node? or must it be manually backed up and then delete the database on the server and then remake it on a new database host when the new database host is set up.

@AndyIsHereBoi
Copy link

is there a way to migrate databases on a node to another node? or must it be manually backed up and then delete the database on the server and then remake it on a new database host when the new database host is set up.

Just name it the same on the new database host and make the same users

@Oxey405
Copy link

Oxey405 commented Jan 31, 2025

This saved me from insanity THANK YOU !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment