Skip to main content

Migrating from Pterodactyl

Pelican upgrades your Pterodactyl database in place: users, servers, nodes, eggs, databases, backups, schedules, subusers and API keys all carry over. Your game servers keep running and keep their files.

Back up first

The migration changes your database and can't be undone. Back up your database, /var/www/pterodactyl and /etc/pterodactyl before you start. If anything goes wrong, ask on Discord.

Requirements​

Migrate the Panel​

Download the script and run the checks. They change nothing and tell you exactly what to fix, like a PHP version that's too old or a missing extension.

curl -fsSLo migrate-panel.sh https://pelican.dev/migrate-panel.sh
sudo bash migrate-panel.sh --check

Once every check passes, run the migration:

sudo bash migrate-panel.sh

It installs Pelican in /var/www/pelican, copies your .env and upgrades the database. It also sets up the queue worker and cron job. Your old install stays untouched in /var/www/pterodactyl.

Last, point your webserver at /var/www/pelican/public and disable the Pterodactyl site.

Migrate Wings​

Run this on every node. It checks everything first, then swaps in Pelican Wings and keeps your existing config and server files.

curl -fsSLo migrate-wings.sh https://pelican.dev/migrate-wings.sh
sudo bash migrate-wings.sh

What changes​

  • Nests and locations become tags. Eggs get a tag with their old nest name and nodes get one with their old location.
  • API keys keep working, including old ptla_/ptlc_ keys. The nests and locations API endpoints are gone, see the API docs.
  • Root admins get the Root Admin role.
  • Themes and panel modifications don't carry over. Look for a plugin instead.
Migrating by hand

Use this instead of the scripts if you want to run each step yourself.

Stop Pterodactyl and back up the database.

cd /var/www/pterodactyl
sudo php artisan down
sudo systemctl disable --now pteroq
sudo crontab -e # remove the line running /var/www/pterodactyl/artisan schedule:run
grep '^DB_' .env
mysqldump -h <DB_HOST> -P <DB_PORT> -u <DB_USERNAME> -p --single-transaction --no-tablespaces <DB_DATABASE> > ~/pterodactyl-backup.sql

Install Pelican. Follow Getting Started up to (and including) Install Composer, but don't run the web installer. Then copy your .env and upgrade the database:

sudo cp /var/www/pterodactyl/.env /var/www/pelican/.env
cd /var/www/pelican
sudo php artisan optimize:clear
sudo php artisan migrate --seed --force

HASHIDS_SALT, HASHIDS_LENGTH, APP_THEME and APP_ENVIRONMENT_ONLY are no longer used and can be removed from .env.

Finish the setup. Set permissions and configure your webserver. Then set up the queue worker and cron job, and bring the Panel up:

sudo php artisan p:environment:queue-service
(sudo crontab -l -u www-data 2>/dev/null; echo "* * * * * php /var/www/pelican/artisan schedule:run >> /dev/null 2>&1") | sudo crontab -u www-data -
sudo php artisan up

Wings, on every node:

sudo systemctl stop wings
sudo curl --fail -L -o /usr/local/bin/wings "https://github.com/pelican/wings/releases/latest/download/wings_linux_$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")"
sudo chmod u+x /usr/local/bin/wings
sudo mkdir -p /etc/pelican
sudo cp /etc/pterodactyl/config.yml /etc/pelican/config.yml

Update /etc/systemd/system/wings.service to match the one in Installing Wings (the working directory is now /etc/pelican), then run sudo systemctl daemon-reload and sudo systemctl start wings.