A handy reference page for common CyberPanel commands and configurations.
I made a list of the most common configurations and issues that I deal with on CyberPanel servers. If you don’t find what you need here, check on CyberPanel documentation or forums.
Install (CentOS):
yum update, press “y” when askedsh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)(official link)- To update (when new versions are available),
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)(official link, for most recent update instructions and quick fixes if you see errors)
Usual configs after installation:
- after finished, log into panel and create admin user account for client
- go to security/firewall and open port 7080 for LS console
- change LS console pass with
cd /usr/local/lsws/admin/miscand./admpass.sh - log into LS console and enable brotli, WP security throttle (if you have LS Enterprise)
- take note of mysql root password with
cat /etc/cyberpanel/mysqlPassword(used for logging into phpmyadmin) - php.ini limits must be increased for for CP (PHP7.0), and you should do the same for all other php versions as well
- Setting SSHD port in firewall
- SFTP (if you need it) – IP, root, root pass, SSH port, and make sure you choose SFTP protocol
- Go to “PHP > Install Extensions” if you any PHP extensions for certain plugins, etc.
- Enable crawler,
vi /usr/local/lsws/conf/httpd.confand add the lines below underneathCacheRoot /home/lscache/:
CacheEngine on crawler
SetEnv CRAWLER_USLEEP 1000
SetEnv CRAWLER_LOAD_LIMIT 5.2OpenLiteSpeed:
- Check version –
/usr/local/lsws/bin/openlitespeed -v - Update OLS –
yum updateandyum upgrade openlitespeed
Logs:
- View from UI at
https://yourdomain.com::8090/serverlogs/ - Or from terminal –
cat /home/cyberpanel/error-logs.txt(log files on CyberPanel) - Important log file locations – https://cyberpanel.net/docs/log-files-on-cyberpanel/
SSL certificates:
- SSL not renewing properly – run the acme
wget -O - https://get.acme.sh | sh - Need to edit SSL’s manually? Look in
/etc/letsencrypt/live - Need to check errors regarding SSL’s? Go to
https://serverip:8090/serverstatus/cyberCPMainLogFilein your browser
MariaDB:
- Get phpMyAdmin pass –
cat /etc/cyberpanel/mysqlPassword(user is “root”) - Restart control panel?
systemctl restart lscpd - Restart mariadb
systemctl restart mariadb
Configurations:
- Changing mysql root pass? – edit
/etc/cyberpanel/mysqlPassword,home/cyberpanel/.my.cnf, and/root/cyberpanel/CyberCP/settings.py,/usr/local/settings.py, and/usr/local/CyberCP/CyberCP/settings.py - How to do redirects in htaccess. You have to use different directives.
Common fixes:
- Cron schedules –
/etc/crontabclear out unnecessary cronjobs eating up server resources (backups). Reference link. - Restart database –
systemctl start mariadb - If having database error connection issues, try changing DB user password to match what you have in wp-config.php. Also check mysql root password in
/usr/local/cyberpanel/settings.py - Look for a (potentially) better mysql config? Try this.
- Need to edit mysql configs? You can find it in
/home/cyberpanel/.my.cnf - 404 errors, or .htaccess/vhost configs not applying immediately after updates? This issue can happen on OLS (which doesn’t support live htaccess updates). Try restarting LiteSpeed (Server Status > LiteSpeed Status > Reboot LiteSpeed).
- Terminal not working – make sure port 5678 is open in firewall, also
systemctl restart cpssh. - Can’t connect to your panel on Amazon Lightsail? Go to the Networking section in Lightsail and open ports 8090 (for CyberPanel) and 7080 (for LiteSpeed console).
- Multisite – use child domains instead of domain aliases. Can follow our hosting documentation here.
- Troubleshooting diagnosis steps – https://cyberpanel.net/docs/troubleshooting-cyberpanel/
- Rpmdb open errors during upgrade, backup rpmdb
mv /var/lib/rpm/__db* /tmp, thenyum clean allandyum update, and remove rpmdb backup if yum update worksrm -i /tmp/__db*. - SSL certifications not renewing? – try going to /etc/letsencrypt/live/yourdomain.com and make sure the privkey has permissions of 644 instead of 600. Handy tool for diagnosing SSL.
- Annoying license error – refresh LS license
/usr/local/lsws/bin/lshttpd -v
Emails:
- Generating SSL for mail domain.
- Setting up custom mail server SSL.
- Rainloop webmail giving “unknown error” – try restart
- Other email issues? Can make sure SELinux is disabled.
- Getting emails delivered
Backups:
- Controlling backup schedule (time of day), for now can be done by editing cron job in
/etc/crontab, like0 3 * * 0-6 root python /usr/local/CyberCP/plogical/backupSchedule.py.
Want to see general Linux server commands?
source credit:
https://wpjohnny.com/cyberpanel-cheatsheet/#:~:text=Restart%20control%20panel%3F,Restart%20mariadb%20systemctl%20restart%20mariadb
Yorumlar
Yorum Gönder