Upgrading 0.4.X to 0.5.X
Upgrading 0.4.X to 0.5.X
This Software is Abandoned
This documentation is for abandoned software which does not recieve any security updates or support from the community. This documentation has been left accessible for historial reasons.
You should be installing and using Wings in production environments with Pterodactyl Panel 1.0.
警告
This upgrade process will require that all servers running through the Daemon be offline for a short period of time while data is reorganized and server containers are rebuilt. Please plan accordingly for this.
You will need to update your Panel to the 0.7.X series in order to complete this process as well.
Docker Adjustments
Previously we provided a quick Docker installation script in our installation instructions. We made the regrettable mistake of not reading deeper into it and realizing it enabled edge release channels for Docker. You'll want to take a look at the official documentation for Docker and change your channel to be a stable release channel.
Please reference the official Docker documentation for how to install Docker CE on your server. Some quick links are listed below for commonly supported systems.
Download Files
To upgrade from v0.4.X first switch the directory where you installed your Daemon. If you followed the installation guide your Daemon is most likely located in /srv/daemon
. Then, download and unpack the archive using the command below.
curl -L https://github.com/pterodactyl/daemon/releases/download/v0.5.7/daemon.tar.gz | tar --strip-components=1 -xzv
Then, update the core dependencies for the Daemon with the following command.
npm update --only=production
SFTP Cleanup
This version of the Daemon ships with an internal SFTP subsystem, no more need for a special Docker container or confusing file permissions. For the most part the Daemon can handle all of the internal changes that make this possible, you'll just need to remove the old Docker container for SFTP.
To do so, simply run the following commands, changing 2022
if you are using a different port.
docker rmi -f quay.io/pterodactyl/scrappy
sudo kill $( sudo lsof -i:2022 -t )
Once you have completed that step, you will need to boot the Daemon in order to have the new system user created automatically. This can be done by running sudo npm start
in the Daemon directory. You'll want to run it in the foreground in order to monitor progress and make sure it executes without issues. Once it has finished running and the Daemon is up and running, stop it again using CTRL+C
.
If for whatever reason you need your user to be named something other than pterodactyl
you can change that in the core.json
before booting the Daemon by setting the docker.container.username
key. 99.9% of users will not need to change the username.
File Migration
Now for the longest part of the upgrade: data migration. You only need to migrate data once when updating from v0.4.X.
You'll need all of your servers to be stopped for this part of the migration. All of their containers will also need to be rebuilt, but this will be completed on the Panel with a console command since we also need to update their configurations with some new data. We will run that command after we migrate all of the data.
To perform this migration, simply run the command below in the Daemon directory and follow its prompts. Be aware it might take a few minutes to run, especially with large volumes of data.
sudo npm run migrate
docker system prune
Rebuild Containers
After migrating your data, you'll also need to run a command on the Panel in order to update all of the configurations for these servers. First, be sure to boot the Daemon in foreground mode (sudo npm start
). You'll then want to run the following command in the Panel directory, not the Daemon directory.
php artisan p:server:rebuild --node=###
Replace ###
above with the ID of your node that is being updated. This will toggle all servers for a rebuild, as well as push the latest information to their configurations. Once this is done, stop the Daemon, run the command below, and then boot it. If you have all daemons running and wish to update them all at once, remove the --node
flag.
Boot the Daemon one last time in the foreground, make sure it completes without errors, and then you can stop it and restart it using your service: sudo systemctl start wings
.
Thanks!
You're all finished! Thanks for bearing with us, this update addresses a lot of flaws in the previous implementations of the software, and also prepares your data for the eventual migration to our new daemon — which is still in the works.