How To Change Default Port For CyberPanel

Truth be told, CyberPanel ranks no. 1 in the list of the most annoying control panels I’ve worked with in my entire dev life!

How so?
Care for a story?
Not interested? You can skip to the next 2 paragraphs.

We recently got a vps from hostinger which came with CyberPanel as its control system. The Good Lord knows I almost cried! Cyberpanel somehow came with OpenLiteAdmin (Another Nightmare To Be Honest). My issue was this; I was trying to run a docker application on the vps, the application is to start nginx on ports 80 and 443 as it rightly should. Guess what took the use of both ports? OpenLiteAdmin! Fixing the issue with OpenLiteAdmin meant that CyberPanel won’t be accesible via its default port :8090.

For more information on how I fixed the OpenLiteAdmin port issue, Check this article.

How did I fix this?

Since the default port :8090 is not accessible by CyberPanel due to my above fix, it means we need to provide another port for it to be accessible from. To do this I had to login as a root user via ssh, then ran the following below:

/usr/local/lscp/conf/
vim bind.conf
i - To enable editing
*:(YOUR_PORT) - Press the esc key to disable editing.
:x - To save and exit the file

You can now access your CyberPanel via https://your_vps_ip_address:YOUR_NEW_PORT
Which means for example https://5.345.8.23:9991

Note that the bind.conf file by default will be empty.
Its not cause for alarm. Just input the new port and you good to go!

And voila!
Issue fixed!
Liked my article? Don’t forget to leave a clap!

A fullstack web developer and a techwriter when the need arises.