Some Don'ts After Installing CyberPanel!

edited March 12 in Tutorials


After installing CyberPanel there are somethings that you don't want to do for having a smooth experience.

Don't upload files via SFTP

When you upload files via sftp they are owned by root, and CyberPanel runs each account through its own user, so once you have uploaded content via root, you might start getting permissions errors. More details can be found here.

Even though file manager now has one-click fix permission button to get rid of this issue, but this is still not a recommended way to upload content.

The recommended way is to use File Manager and FTP. They both use the same user as which scripts are executed for a particular site.

Note: As soon as files are owned by root, file manager may not be able to access and you will start having issues.

Do not remove the Example vhost

Example vhost contains files to run File Manager, so if you delete or make any changes to example vhost , File Manager will stop working.

File Manager

You might notice that each virtual host contains this configuration

context /.filemanager {
  type                    NULL
  location                /usr/local/lsws/Example/html/FileManager
  allowBrowse             1
  autoIndex               1

  accessControl  {
    allow       , localhost
  addDefaultCharset       off

This needs to be present for the file manager to work, once this is deleted file manager will stop working.

Rewrite Rules:

If you have a rewrite rule something like

RewriteRule . index.php<code></p> <p>Which means redirect everything to index.php, so once the request comes for <code>.filemanager it will be redirected to index.php and file manager will stop working, which we don't want.

So just before this rule, you can add

RewriteCond %{ORG_REQ_URI} !/.filemanager

So that when request URL contains file manager it should be addressed properly.

Finally, rules should look like:

RewriteCond %{ORG_REQ_URI} !/.filemanager
RewriteRule . index.php


After CyberPanel installation 2 instances of MYSQL are started, one of these instance runs CyberPanel which listens on port 3307.

The normal mysql instance runs on port 3306. If for some reasons you are going to change these ports, you need to update CyberPanel settings file to reflect these changes.

Settings file is located at /usr/local/CyberCP/CyberCP/

In this file you will find:

    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'cyberpanel',
        'USER': 'cyberpanel',
        'PASSWORD': 'cyberpanel',
        'HOST': '',
    'rootdb': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mysql',
        'USER': 'root',
        'PASSWORD': 'cyberpanel',
        'HOST': 'localhost',
        'PORT': '',

You can see there are two ports mentioned, 3307 and 3306, so incase you have changed these default ports make sure to change them here respectively and than do:

systemctl restart gunicorn.socket

This article is still a work in progress.

Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!