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.
yum update, press “y” when asked
sh <(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
- 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 underneath
CacheEngine on crawler SetEnv CRAWLER_USLEEP 1000 SetEnv CRAWLER_LOAD_LIMIT 5.2
- Check version –
- Update OLS –
yum upgrade openlitespeed
- View from UI at
- 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 not renewing properly – run the acme
wget -O - https://get.acme.sh | sh
- Need to edit SSL’s manually? Look in
- Need to check errors regarding SSL’s? Go to
https://serverip:8090/serverstatus/cyberCPMainLogFilein your browser
- Get phpMyAdmin pass –
cat /etc/cyberpanel/mysqlPassword(user is “root”)
- Restart control panel?
systemctl restart lscpd
- Restart mariadb
systemctl restart mariadb
- Changing mysql root pass? – edit
- How to do redirects in htaccess. You have to use different directives.
- 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
- Look for a (potentially) better mysql config? Try this.
- Need to edit mysql configs? You can find it in
- 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, then
yum clean alland
yum update, and remove rpmdb backup if yum update works
rm -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
- 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
- Controlling backup schedule (time of day), for now can be done by editing cron job in
0 3 * * 0-6 root python /usr/local/CyberCP/plogical/backupSchedule.py.
Want to see general Linux server commands?
“php.ini limits must be increased for PHP7.0 for CP.”
I am running OpenLiteSpeed with CyberPanel on one of my client sites, can’t upload more than 2GB from CyberPanel file manager even after editing php.ini for PHP 7.0.
It doesn’t work; You can’t increase the CP file manager upload limit by just editing the php.ini file. It can only be increased by modifying the codes.
According to Usman Nasir from SLACK:
“2GB is default body limit on LSCPD. So no matter what php.ini you changed, it won’t alter anything in 8090 port, and according to Usman, the LSCPD is limited upload size to 2GB in code.”
By the way, thank you for the excellent post 🙂
Ahhhh….why not use FTP then?
Thanks for this cheat sheet! It’s a great help!
Do you have any security tips for cyberpanel, on how to make CP and WordPress secure? I tried using the bult in ModSec but it ended up interfering with WordPress.
Do you have any tips on this?
Did ModSec block your users or did it block certain API connectivity? You should read my guide on How to HARDEN a Linux web server.
ModSec was interfering with my contact forms, Ajax, and some stuff in the back end. I didn’t even check if it interfered with my visitors, but it probably did. I was using the owasp rule pack.
Thanks for linking your article on hardening Linux. I’ll check it out!
At step Enable crawler, i can’t find “CacheRoot /home/lscache/:” row. File httpd.conf is empty.
Did i miss something?
Please share a Markdown-version of the text 🙂
You’re trying to stick this on GitHub or something? How about an HTML-to-markdown converter? https://www.browserling.com/tools/html-to-markdown
That’s actually a good point. I didn’t look at the source-code, so i just thought it was a mess to make a direct HTML > MD translation. But it turned out pretty good 🙂
It’s just for my personal use, in my markdown note-collection (it’s powered by CodiMD).
Just FYI, adding this code didn’t work for me to enable the crawler.
But adding only the 1st line of the code worked fine: (On Litespeed Enterprise server)
CacheEngine on crawler
See more details:
The first line enables crawler. The subsequent lines puts a limit on it, which you can change for your needs/preferences.
Thanks, a nice resource.
BTW, if you are ever in need of an idea for a new topic, covering ModSecurity Conf/Rules/Rule Packs would be helpful.
I might consider it one day. If I had tons of free time to kill, I’d probably make my own WordPress-specific rules for ModSec. Until then, maybe something like the Rev3rseSecurity ruleset could be useful to you.
If we edit the file:
open_files_limit = 50000
max_allowed_packet = 268435456
innodb_buffer_pool_size = 1G
innodb_log_file_size = 256M
innodb_flush_method = O_DIRECT
innodb_io_capacity = 1000
innodb_old_blocks_time = 1000
innodb_open_files = 5000
key_buffer_size = 16M
read_buffer_size = 256K
read_rnd_buffer_size = 256K
query_cache_size = 256M
query_cache_limit = 5M
join_buffer_size = 4M
sort_buffer_size = 4M
max_heap_table_size = 64M
tmp_table_size = 64M
table_open_cache = 4500
table_definition_cache = 4000
thread_cache_size = 50
Then making backups does not work.
Neither ordinary nor incremental.
These settings also don’t work, there’s a problem with that:
innodb_buffer_pool_size = 8G
innodb_log_buffer_size = 1G
innodb_log_file_size = 1G
innodb_write_io_threads = 16
innodb_flush_log_at_trx_commit = 0
query_cache_limit = 256K
query_cache_min_res_unit = 2k
query_cache_size = 80M
tmp_table_size = 64M
max_heap_table_size = 64M
innodb_file_per_table = 1
wait_timeout = 60
Thanks for reporting this. I’ll look when I have time.
Hi Johnny, thanks for the cheat sheet. Great job.
Just started playing with linux, so be gentle.
Is there a quick way to change pho version?
I use vultr vps and installed cyber panel and litespeed enterprise and even though i choosed 7.4 during installation, phpinfo shows 5.6.4. And i don’t know where to switch. I am used to cpanel but can’t seem to find it in cyber panel or litespeed admin.
Have you check out the CyberPanel documentation?
Hi Johnny, love the cheat sheet.
PHP version is changed in the website panel
– List Websites
– Change PHP
Just brilliant, Johnny! Thanks a lot, and may the Force be with you )