Updating
Make sure you upgrade your PHP version to 8.3 before updating to v0.9 or higher.
apt -y install php8.3 php8.3-{cli,gd,mysql,pdo,mbstring,tokenizer,bcmath,xml,fpm,curl,zip}
apt -y install php8.3-intl
Do not forget to change the PHP version in the NGINX / Apache web configuration to 8.3 as well.
cd /etc/nginx/sites-available/
nano controlpanel.conf
systemctl restart nginx
Enable Maintenance Mode
cd /var/www/controlpanel
sudo php artisan down
Pulling the New Files
sudo git stash
sudo git pull
sudo chmod -R 755 /var/www/controlpanel
Update Dependencies
Please delete your old vendor folder before running the composer command.
sudo rm -rf /var/www/controlpanel/vendor
Make sure composer actualy uses PHP8.3 and not 7.4!
sudo composer install --no-dev --optimize-autoloader
Updating the Database
sudo php artisan migrate --seed --force
Clear Compiled Template Cache
sudo php artisan view:clear
sudo php artisan config:clear
Set Permissions
# If using NGINX or Apache (not on CentOS):
sudo chown -R www-data:www-data /var/www/controlpanel/
# If using NGINX on CentOS:
sudo chown -R nginx:nginx /var/www/controlpanel/
# If using Apache on CentOS
sudo chown -R apache:apache /var/www/controlpanel/
Updating Queue Workers
Before continuing, run the following command to find where your PHP8.3 directory is:
which php8.3
If you use the default /usr/bin/php
and your default is another PHP version your setup will not work. For example, if your PHP8.3 is found at /usr/bin/php8.3
you would update the ExecStart
line accordingly:
ExecStart=/usr/bin/php8.3 /var/www/controlpanel/artisan queue:work --sleep=3 --tries=3
This will ensure that you're using the correct version of PHP.
Run the following commands to edit the systemd file:
cd /etc/systemd/system
nano ctrlpanel.service
Delete the content and paste in this:
# Ctrlpanel Queue Worker File
# ----------------------------------
[Unit]
Description=Ctrlpanel Queue Worker
[Service]
# On some systems the user and group might be different.
# Some systems use `apache` or `nginx` as the user and group.
User=www-data
Group=www-data
Restart=always
ExecStart=/usr/bin/php /var/www/controlpanel/artisan queue:work --sleep=3 --tries=3
StartLimitBurst=0
[Install]
WantedBy=multi-user.target
To put it into effect, run:
systemctl restart ctrlpanel.service
Restart Queue Workers
After every update, you should restart the queue worker to ensure that the new code is loaded in and used.
sudo php artisan queue:restart
sudo systemd
Disable Maintenance Mode
sudo php artisan up
Disclaimer
Warning, The dashboard is currently in pre-release and may contain some bugs 🐛
Use This dashboard at your own risk.
If you notice any bugs or would like something to be improved or added, let us know by making a GitHub Issue
for any major security risk, contact 1Day2Die#6718