Lead Engineer @ Packetware
Migrating Your Pterodactyl Panel & Wings
Migrating your Pterodactyl Panel (and Wings daemon) isn't as scary as it sounds! This guide breaks it into simple steps to ensure your panel and server data make a safe trip to your new machine.
1. Back Up Your Panel Secrets
Your Pterodactyl panel has a hidden .env
file with important secrets, especially the APP_KEY
for encrypting data. Never lose this file!
cp /var/www/pterodactyl/.env /var/www/pterodactyl/.env.backup
Copy .env.backup
somewhere safe! (USB, cloud drive, etc.)
2. Export Your Database
Your panel stores info in a database named panel
(by default). Let's export it:
mysqldump -u root -p --opt panel > /var/www/pterodactyl/panel.sql
Tip: The resulting
panel.sql
file will appear in/var/www/pterodactyl/
.
3. Install Pterodactyl Panel on the New Server
Follow the official Pterodactyl panel installation guide for your new machine.
- Don’t start creating users or servers yet; we’ll restore your real data in the next step!
4. Transfer Database and Files
- Move backup files to the new server (panel.sql & .env):
# On your OLD server
scp /var/www/pterodactyl/panel.sql user@NEW_SERVER:/path/to/your/folder/
scp /var/www/pterodactyl/.env user@NEW_SERVER:/path/to/your/folder/
- On the new server, move
.env
to the correct location:
mv /path/to/your/folder/.env /var/www/pterodactyl/.env
- Import your database (inside panel folder):
mysql -u root -p panel < /path/to/your/folder/panel.sql
5. Migrate Wings (Daemon)
a. Install Wings
- See the official Wings install docs.
b. Use the install configuration of the previous node
c. Migrate your server volumes
- Your game/data files are in
/var/lib/pterodactyl/volumes/
(unless you set a custom path inconfig.yml
). - Use
rsync
(recommended) orscp
:
rsync -avz /var/lib/pterodactyl/volumes/ user@NEW_SERVER:/var/lib/pterodactyl/volumes/
- Make sure ownership and permissions match on the new server.
6. Update Allocations (IP Addresses)
Your new Wings might have a different IP! Let's update it in your panel database.
Find your new IP:
hostname -I | awk '{print $1}'
Update the allocation table:
Login to MySQL:
mysql -u root -p
Update the IP:
USE panel;
UPDATE allocations SET ip = 'YOUR_NEW_IP' WHERE ip = 'YOUR_OLD_IP';
EXIT;
7. Final Checks
- Start your panel and wings, then test logging in and managing servers.
- Double-check file permissions and run
php artisan queue:restart
if needed.
Your panel, wings, and all server data are now on your new machine. Enjoy the improved performance or better hosting!
Need more details?