Upgrade Guide
This document covers the process of upgrading MineTrax from older version to latest. It is highly recommened to always keep your version updated to get latest features and bug fixes.
Supported Versions
Web Version | Plugin Version | Supported | PHP Versions | Minecraft Versions |
---|---|---|---|---|
2.0.0 | 2.0.0 | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 | |
2.1.0 | 2.0.0 | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 | |
3.1.0 | 3.0.0 | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 | |
3.5.0 | 3.5.0 | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 | |
4.3.0 | 4.0.2 | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 | |
5.1.0 | 5.0.0 | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 | |
6.0.0 | 6.0.0 | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 | |
6.3.0 | 6.3.0 | ✅ | 8.1+ | 1.16 , 1.17 , 1.18 , 1.19 , 1.20 |
You can update your Web using either Automatic or Manual method.
Automatic Upgrading Web
AutoInstaller or Manually
When you have installed minetrax using AutoInstaller
or Manually
you can use this method to upgrade your web to latest version.
Using this mode all you have to do is take latest pull and run a script.
cd /var/www/minetrax
bash update.sh
Note: It should automatically update everything for you. If it fails you will have to manually handle update using below manual method.
Docker
When you have installed minetrax using Docker
you can use this method to upgrade your web to latest version.
If you installed minetrax using docker then cd into minetrax directory and run:
cd /var/www/minetrax
bash docker-run.sh down
bash docker-run.sh up
It should automatically update everything for you. Check bash docker-run.sh logs
for any issue.
Manually Upgrading Web
Upgrade guide for web consider Ubuntu
as operating system. If you using some other OS you might have to tweak some commands accordingly.
Only when you installed using AuthInstaller
or Manually
Follow the process step by step to upgrade web to latest version.
1. Enter Maintenance Mode
Maintenance mode will disable the web for end user so we don't expose any unexpected error or logs to them.
cd /var/www/minetrax
php artisan down
2. Clear compiled template & cache
cd /var/www/minetrax
php artisan cache:clear
php artisan view:clear
php artisan config:clear
php artisan clear
3. Take the latest pull
Take latest pull from the Github web repo.
cd /var/www/minetrax
git pull
If you have made any changes to the code, this process might fail and you have to revert back your changes before taking the pull. If the process fail then stash out your local changes and try to pull again. Make sure to backup your changes so you can add them back.
cd /var/www/minetrax
git stash
git pull
4. Fix Permissions
Once latest changes are pulled fix back the permissions for files.
- Apache2
- Nginx
# If using NGINX or Apache (not on CentOS):
chown -R $USER:www-data /var/www/minetrax/*
# or, If using Apache on CentOS
chown -R $USER:apache /var/www/minetrax/*
# If using NGINX or Apache (not on CentOS):
chown -R $USER:www-data /var/www/minetrax/*
# or, If using NGINX on CentOS:
chown -R $USER:nginx /var/www/minetrax/*
Change permission for storage
and bootstrap/cache
folders
cd /var/www/minetrax
chmod -R 775 storage/* bootstrap/cache
In some rare cases if you are getting error like The stream or file "/var/www/minetrax/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied
then you might have to change the permission of storage/logs
folder to 777
instead of 775
.
cd /var/www/minetrax
chmod -R 777 storage/* bootstrap/cache
4. Update the composer
Install the latest dependencies changes from composer
cd /var/www/minetrax
composer install
5. Run the migrations
cd /var/www/minetrax
php artisan migrate --force --seed
6. Restart the Queue Listeners
cd /var/www/minetrax
php artisan queue:restart
7. Fix Permissions
chown -R www-data:www-data /var/www/minetrax/*
8. Exit the Maintenance Mode
Everything is done! Now lets turn back the site up for everyone.
cd /var/www/minetrax
php artisan up
Some version upgrade might introduce breaking changes. If so, it will be mentioned in the release note and discord. Make sure to read the release note on github and discord for any additional step required for upgrading to version with breaking changes.
Web Release Notes: https://github.com/MineTrax/minetrax/releases
Upgrading Plugin
Upgrading your plugin is as simple as just downloading the latest version of the plugin and replacing old Minetrax.jar
file with the new one.
Download Link: https://github.com/MineTrax/plugin/releases
Make sure to replace the file and not keep two version of it in plugins directory.
Eg: If you have Minetrax-1.0.2.jar
and upgrading to Minetrax-1.0.3.jar
make sure to delete the old file i.e., Minetrax-1.0.2.jar
.