CyberPanel commands cheat sheet

This cheat sheet brings together the most useful commands for managing a CyberPanel server from the command line: updates, services, passwords, users and packages, websites, databases, email, FTP, DNS, SSL certificates, backup and restore, PHP, the firewall, and log locations. You can search for a command, filter by topic, and copy it with one click.

Version and updates

  • cyberpanel version

    Shows the CyberPanel version and its build number. The short form cyberpanel v shows the same information.

  • cyberpanel -h

    Lists the options of the cyberpanel command-line tool. You run all cyberpanel commands as root.

  • sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

    Upgrades CyberPanel to the latest stable version with the official upgrade script. The upgrade updates OpenLiteSpeed too, but not the operating system. Caution: before you upgrade, create a backup or a snapshot of the server, and make sure there's enough free disk space.

  • cyberpanel utility

    Opens the CyberPanel utility menu, with options for upgrading, installing addons, WatchDog, and the FAQ.

Services

  • systemctl status lscpd

    Shows the status of lscpd, the service that runs the CyberPanel interface on port 8090.

  • systemctl restart lscpd

    Restarts the CyberPanel interface. Useful when the interface doesn't load, and the websites keep running during the restart.

  • systemctl restart lsws

    Restarts the OpenLiteSpeed web server gracefully, without disconnecting the websites. Needed, for example, after you change the web server settings by hand.

  • /usr/local/lsws/bin/openlitespeed -t

    Checks the OpenLiteSpeed configuration files and shows errors. It's best to run it before you restart the web server.

  • systemctl restart postfix dovecot

    Restarts the mail services: Postfix, which sends and receives mail, and Dovecot, which provides mailbox access over IMAP and POP3.

  • systemctl restart pdns

    Restarts PowerDNS, the DNS server that CyberPanel manages.

Interface access and passwords

  • adminPass 'NewStrongPass'

    Resets the password of the admin user in the CyberPanel interface. Put a password with special characters in single quotes.

  • /usr/local/lsws/admin/misc/admpass.sh

    Sets a username and password for the OpenLiteSpeed WebAdmin console, which is available on port 7080. To connect to it, open the port in the firewall.

  • mysql -u root -p

    Connects to MariaDB as root. CyberPanel saves the root password in the /etc/cyberpanel/mysqlPassword file.

Users and packages

  • cyberpanel createUser --firstName John --lastName Doe --email jdoe@example.com --userName jdoe --password 'StrongPass' --websitesLimit 5 --selectedACL user --securityLevel HIGH

    Creates a new user in the interface. All the options in the command are required. The selectedACL option sets the permission level: admin, reseller, user, or a custom ACL defined in the interface, and the securityLevel option takes HIGH or LOW.

  • cyberpanel listUsers

    Lists the users in JSON format, with each user's owner, permission level, disk usage, website limit, and status.

  • cyberpanel suspendUser --userName jdoe --state SUSPEND

    Suspends a user. The same command with the value UNSUSPEND reactivates the user.

  • cyberpanel deleteUser --userName jdoe

    Caution: deletes the user and the users that user created. A user who owns websites isn't deleted, so move or delete the user's websites before you run it.

  • cyberpanel createPackage --owner admin --packageName Basic --diskSpace 10000 --bandwidth 100000 --emailAccounts 10 --dataBases 5 --ftpAccounts 5 --allowedDomains 3

    Creates a hosting package. Disk space and bandwidth are in MB, written without the unit. The allowedDomains option is the number of child domains that can be added to a website.

  • cyberpanel listPackagesPretty

    Lists the packages in a table. The cyberpanel listPackagesJson command lists them in JSON format.

  • cyberpanel changePackage --domainName example.com --packageName Basic

    Moves a website to a different package. Specify the main domain, because a child domain doesn't have its own package.

Websites and domains

  • cyberpanel createWebsite --package Default --owner admin --domainName example.com --email admin@example.com --php 8.3

    Creates a new website with its own system user. The PHP version you specify must be installed on the server. With --ssl 1, an SSL certificate is issued too, and with --dkim 1, a DKIM key is created for the domain's email.

  • cyberpanel listWebsitesPretty

    Lists the websites on the server in a table. The cyberpanel listWebsitesJson command lists them in JSON format.

  • cyberpanel changePHP --domainName example.com --php 8.3

    Changes the PHP version of a website or a child domain.

  • cyberpanel createChild --masterDomain example.com --childDomain shop.example.com --owner admin --php 8.3

    Adds a child domain to an existing website. By default, the files are saved in the /home/example.com/public_html/shop.example.com directory, and with --path, you can choose a different directory inside the website's directory.

  • cyberpanel deleteChild --childDomain shop.example.com

    Deletes a child domain and its settings. Its files stay in the directory, so delete them by hand when you no longer need them.

  • cyberpanel installWordPress --domainName example.com --email admin@example.com --userName wpadmin --password 'StrongPass' --siteTitle "My Site"

    Installs WordPress on an existing website and creates a WordPress administrator user. With --path blog, WordPress is installed in the blog subdirectory.

  • cyberpanel deleteWebsite --domainName example.com

    Caution: deletes the website with its files, child domains, databases, mailboxes, and DNS zone. The deletion can't be undone, so create a backup before you run it.

Databases

  • cyberpanel createDatabase --databaseWebsite example.com --dbName exampledb --dbUsername exampleuser --dbPassword 'StrongPass'

    Creates a database and a user with privileges on it, and assigns them to the website. The database name and the username are limited to 32 characters.

  • cyberpanel listDatabasesPretty --databaseWebsite example.com

    Lists the website's databases in a table. The listDatabasesJson command lists them in JSON format.

  • cyberpanel deleteDatabase --dbName exampledb

    Caution: deletes the database with all its data, and its user. Back up the database before you delete it, for example with mysqldump.

Email

  • cyberpanel createEmail --domainName example.com --userName info --password 'StrongPass'

    Creates the info@example.com mailbox.

  • cyberpanel listEmailsPretty --domainName example.com

    Lists the domain's mailboxes in a table. The listEmailsJson command lists them in JSON format.

  • cyberpanel changeEmailPassword --email info@example.com --password 'NewStrongPass'

    Changes a mailbox password. After the change, update the password in your email apps and on your phone too.

  • cyberpanel deleteEmail --email info@example.com

    Caution: deletes the mailbox, and the address stops receiving mail.

  • postqueue -p

    Shows the Postfix mail queue: the ID, size, sender, and recipients of each message waiting to be sent.

  • postqueue -f

    Tries to send all the queued messages right away. Running it often slows down the delivery of the rest of the mail.

  • postsuper -d ALL deferred

    Caution: deletes all the messages in the deferred queue, whose delivery failed and was postponed for another attempt. To delete a single message, specify its ID from the postqueue -p output instead of ALL deferred.

FTP accounts

  • cyberpanel createFTPAccount --domainName example.com --userName ftpuser --password 'StrongPass' --owner admin

    Creates an FTP account with access to the /home/example.com directory. From the command line, the username is saved exactly as you type it, without the owner prefix that the interface adds (for example, admin_ftpuser).

  • cyberpanel listFTPPretty --domainName example.com

    Lists the website's FTP accounts in a table, with each account's username and directory.

  • cyberpanel deleteFTPAccount --userName ftpuser

    Deletes an FTP account by its username as it appears in the listFTPPretty output. The website's files stay in place. You change a password the same way with cyberpanel changeFTPPassword --userName ftpuser --password 'NewStrongPass'.

DNS

  • cyberpanel listDNSZonesPretty

    Lists the DNS zones managed on the server.

  • cyberpanel createDNSZone --owner admin --domainName example.com

    Creates a DNS zone for the domain with basic records: SOA, NS, A, CNAME, MX, SPF, and DMARC.

  • cyberpanel listDNSPretty --domainName example.com

    Lists the domain's DNS records. The first column shows each record's ID, which you use to delete it.

  • cyberpanel createDNSRecord --domainName example.com --name www.example.com --recordType A --value 192.0.2.10 --priority 0 --ttl 3600

    Adds a DNS record. Write the full name, for example www.example.com. For an MX record, write the mail server name as the value of --value and the priority as the value of --priority, for example 10.

  • cyberpanel deleteDNSRecord --recordID 200

    Deletes a record by its ID from the listDNSPretty output.

  • cyberpanel deleteDNSZone --domainName example.com

    Caution: deletes the DNS zone with all its records. When the server is the domain's DNS server, the website and email stop working until the zone is created again.

SSL certificates

  • cyberpanel issueSSL --domainName example.com

    Issues a free SSL certificate for a website or a child domain. The domain must point to the server before you issue it.

  • cyberpanel hostNameSSL --domainName panel.example.com

    Issues a certificate for the server's hostname, so the interface opens at https://panel.example.com:8090 without a security warning. Create a website with this domain first.

  • cyberpanel mailServerSSL --domainName example.com

    Installs a certificate for the Postfix and Dovecot mail servers, instead of the self-signed certificate. Choose a domain that the PTR (rDNS) record of the server's IP address points to.

Backup and restore

  • cyberpanel createBackup --domainName example.com

    Creates a full backup of the website and saves it in the /home/example.com/backup directory. The command finishes only when the backup is ready, and it shows the path of the backup log when it starts.

  • cyberpanel restoreBackup --fileName /home/example.com/backup/backup-example.com-11.29.2026_03-00-00.tar.gz

    Restores a website from a backup file. When the file is in the /home/backup directory, the file name is enough, and anywhere else, specify the full path. Restoring works only with backups created in CyberPanel.

PHP versions

  • /usr/local/lsws/lsphp83/bin/php -v

    Runs a specific PHP version from the command line. Each version is installed in the /usr/local/lsws/lsphpXX directory, for example lsphp83 for version 8.3, and you use this path in cron jobs too.

  • ln -sfn /usr/local/lsws/lsphp83/bin/php /usr/bin/php

    Changes the PHP version that the php command runs from the command line. The websites aren't affected, and you change their version with changePHP.

Firewall

  • firewall-cmd --zone=public --list-all

    Shows the active ports, services, and rules in FirewallD, the firewall that CyberPanel manages by default.

  • firewall-cmd --zone=public --list-rich-rules

    Shows the rules added from the interface. CyberPanel saves them as rich rules.

  • firewall-cmd --permanent --zone=public --add-port=7080/tcp && firewall-cmd --reload

    Opens a port permanently and reloads the firewall. In the example, port 7080 of the WebAdmin console is opened.

  • csf -d 203.0.113.5

    Blocks an IP address in CSF, when CSF is installed from the interface. Installing CSF turns off FirewallD, and from then on, the rules are managed in CSF.

  • csf -dr 203.0.113.5

    Unblocks an IP address that was blocked in CSF.

Logs and troubleshooting

  • tail -f /home/cyberpanel/error-logs.txt

    Shows the main CyberPanel log live, with the errors of interface actions. Press Ctrl+C to stop.

  • touch /usr/local/CyberCP/debug

    Turns on more detailed logging in the main interface log, for troubleshooting. The rm /usr/local/CyberCP/debug command restores normal logging.

  • journalctl -f | grep lscpd

    Shows the messages of the interface service live. Run it, and at the same time repeat the action that failed in the interface.

  • /usr/local/lsws/logs/error.log

    The general error log of the web server. The same directory holds access.log, the general request log.

  • /home/example.com/logs/example.com.error_log

    The error log of a single website. The same directory holds example.com.access_log, with the requests to the website.

  • /var/log/maillog

    The Postfix and Dovecot mail log, to check messages that weren't sent or received. On Ubuntu servers, the log is at /var/log/mail.log.

  • /usr/local/lsws/logs/auditmodsec.log

    The log of requests that ModSecurity checked or blocked, when ModSecurity is on. Check it when a form or page on the website is blocked for no clear reason.

Before you work with CyberPanel from the command line

  • Root privileges: You run the cyberpanel command, adminPass, and the service commands as root. A user with sudo privileges switches to root with sudo su - before running them.
  • Command output: Most cyberpanel commands return a response in JSON format. Check the errorMessage field (error_message in the user commands): when the action succeeds, it shows None, and when it fails, it shows an explanation.
  • Passwords: A password written in a command is saved in the shell's command history. Put a password with special characters in single quotes, and when you're done, delete those lines from the history.
  • Back up before changes: Before you delete, restore, or upgrade, create a backup with createBackup or a snapshot of the server so you can return to the previous state.
  • Ports: The CyberPanel interface is available on port 8090, and the OpenLiteSpeed WebAdmin console on port 7080, both over a secure connection.

The usernames, domains, IP addresses, and passwords on this page are examples, so replace them with your real values. For an explanation of the records you add to a DNS zone, see DNS record types, and for the meaning of email sending error messages, see SMTP error codes.

Did you know?

On a Linux VPS, you connect over SSH with full root access and control the entire server: installing software, editing settings, managing services, and reading logs.

Linux VPS plans

CyberPanel commands FAQ

How do I reset the admin password in CyberPanel?

Connect to the server over SSH as root and run the adminPass command with the new password, for example adminPass 'NewStrongPass'. The command changes the password of the admin user, and you can then log in to the interface with the new password. An administrator who's already logged in to the interface can also change the password by editing the user (Modify User).

How do I upgrade CyberPanel to the latest version?

Run the official upgrade script, preUpgrade.sh, as root, with the command shown on this page in the version and updates section. The script updates CyberPanel and OpenLiteSpeed, and you update the operating system separately. Before you upgrade, create a backup or a snapshot and check that there's free disk space, and afterward, check the new version with cyberpanel version.

How do I create a new website in CyberPanel from the command line?

Run cyberpanel createWebsite with the package, the owner, the domain, the administrator's email address, and the PHP version, for example cyberpanel createWebsite --package Default --owner admin --domainName example.com --email admin@example.com --php 8.3. Once the domain points to the server, issue an SSL certificate for it with cyberpanel issueSSL --domainName example.com, and you can install WordPress on it with cyberpanel installWordPress.

Which port do I use to access the CyberPanel interface?

The interface is available on port 8090, at the server's IP address, for example https://192.0.2.10:8090. To log in with a domain name and without a security warning, create a website with the domain, for example panel.example.com, and issue a certificate for it with cyberpanel hostNameSSL. When the domain goes through the Cloudflare proxy, port 8090 isn't supported, so log in by IP address or set the record in Cloudflare to DNS only.

Where are a website's logs in CyberPanel?

Each website's logs are in the logs directory inside the website's directory, for example /home/example.com/logs/example.com.error_log for errors and example.com.access_log for requests. The general web server log is at /usr/local/lsws/logs/error.log, and the log of the interface itself is at /home/cyberpanel/error-logs.txt.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement