Uninstall
You will lose all data that you have stored in your Ctrlpanel.
Before you start
- This will only work if you have carefully followed our documentation.
- You might need to modify the commands to fit your installation.
Stop everything
Before deleting anything, you need to stop CtrlPanel and all of its services.
cd /var/www/ctrlpanel
sudo php artisan down
sudo systemctl stop ctrlpanel
Delete files
Service and cronjob
You have to stop and remove the services and cronjobs.
sudo systemctl stop ctrlpanel
sudo systemctl disable ctrlpanel
sudo rm /etc/systemd/system/ctrlpanel.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
To open crontab, please run crontab -e and remove the following configuration from crontab.
* * * * * php /var/www/ctrlpanel/artisan schedule:run >> /dev/null 2>&1
Webconfig and SSL certificates
Once you've done this, you need to remove the webserver configuration and restart it.
- Nginx
- Apache
sudo unlink /etc/nginx/sites-enabled/ctrlpanel.conf
sudo rm /etc/nginx/sites-available/ctrlpanel.conf
sudo systemctl reload nginx
sudo a2dissite ctrlpanel.conf
sudo rm /etc/apache2/sites-available/ctrlpanel.conf
sudo systemctl reload apache2
Don't forget to delete SSL certificates.
sudo certbot delete --cert-name <Your Domain>
Database and User
Now that you've deleted the webserver files, you need to remove the database and user:
- MySQL
- MariaDB
mysql -u root -p
DROP DATABASE ctrlpanel;
DROP USER 'ctrlpaneluser'@'127.0.0.1';
FLUSH PRIVILEGES;
exit
mariadb -u root -p
DROP DATABASE ctrlpanel;
DROP USER 'ctrlpaneluser'@'127.0.0.1';
FLUSH PRIVILEGES;
exit
Files
Now you need to remove the files.
sudo rm -rf /var/www/ctrlpanel
Optional
Extra Dependency
CtrlPanel should now be uninstalled. If you want to fully clean your server, please run the following commands. You need to uninstall PHP. Make sure to check your PHP version before you do this.
sudo apt remove php8.3-{intl,redis}
Pterodactyl API Key
Login to your Pterodactyl panel and go to the admin page.
Then go to the API tab (/admin/api) and delete the key you made for CtrlPanel.