AdminsForum

CyberPanel CLI & API Guides

Guide CyberPanel CLI Cheat Sheet: Every cyberpanel Command With Working Examples

Started by JAY 0 replies 127 views
1JAY
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
CyberPanel CLI Cheat Sheet: Every cyberpanel Command With Working Examples

Everything you click in CyberPanel can also be done with the cyberpanel command over SSH. That's handy for scripts, for creating 20 sites at once, and for the day the web panel won't load. This cheat sheet lists every function in CyberPanel 3.0 (we pulled the list straight from the installed CLI) with examples.

The basics
Code:
cyberpanel FUNCTION --option value --option value
Run it as root. Here it is creating a package:
Code:
cyberpanel createPackage --owner admin --packageName Business --diskSpace 0 --bandwidth 0 --emailAccounts 50 --dataBases 20 --ftpAccounts 10 --allowedDomains 0 2>/dev/null {"success": 1, "errorMessage": "None"}
and then listing all packages as JSON. Business is the one we just created; admin_LimitTest came later, from our packages test:
[Image: attachment.php?aid=542]
  • Most commands answer in JSON.
    Code:
    {"success": 1, "errorMessage": "None"}
    means it worked.
  • Code:
    cyberpanel --help
    lists all options.
  • On Ubuntu 24.04 you may see Python lines like
    Code:
    SyntaxWarning: invalid escape sequence
    before the answer. They're harmless warnings from Python 3.12, not errors. Add
    Code:
    2>/dev/null
    to hide them.
  • Put values with spaces or special characters in single quotes:
    Code:
    --password 'My$ecret!'
    .

Websites
Code:
cyberpanel createWebsite --package Default --owner admin --domainName example.com --email [email protected] --php 8.3 cyberpanel deleteWebsite --domainName example.com cyberpanel createChild --masterDomain example.com --childDomain shop.example.com --owner admin --php 8.3 cyberpanel deleteChild --childDomain shop.example.com cyberpanel changePHP --domainName example.com --php 8.3 cyberpanel changePackage --domainName example.com --packageName Starter cyberpanel listWebsitesJson cyberpanel listWebsitesPretty
Add
Code:
--ssl 1
to issue SSL during creation and
Code:
--dkim 1
to create a DKIM key;
Code:
--php
takes the version number only (
Code:
8.3
, not "PHP 8.3"). For a child domain the folder defaults to
Code:
public_html/CHILDDOMAIN
; change it with
Code:
--path
. A package must exist before you create a website. See packages, users and ACLs.

SSL certificates
Code:
cyberpanel issueSSL --domainName example.com # Let's Encrypt for a site cyberpanel hostNameSSL --domainName panel.example.com # SSL for the panel on :8090 cyberpanel mailServerSSL --domainName example.com # SSL for mail (IMAP/SMTP) cyberpanel issueSelfSignedSSL --domainName example.com
The domain's DNS must already point to this server, or Let's Encrypt can't verify it.

Databases
Code:
cyberpanel createDatabase --databaseWebsite example.com --dbName example_wp --dbUsername example_user --dbPassword 'StrongPass123' cyberpanel deleteDatabase --dbName example_wp cyberpanel listDatabasesJson --databaseWebsite example.com cyberpanel listDatabasesPretty --databaseWebsite example.com

Email
Code:
cyberpanel createEmail --domainName example.com --userName info --password 'StrongPass123' cyberpanel changeEmailPassword --email [email protected] --password 'NewPass456' cyberpanel deleteEmail --email [email protected] cyberpanel listEmailsJson --domainName example.com cyberpanel listEmailsPretty --domainName example.com

FTP
Code:
cyberpanel createFTPAccount --domainName example.com --userName ftpuser --password 'StrongPass123' --owner admin cyberpanel changeFTPPassword --userName example_ftpuser --password 'NewPass456' cyberpanel deleteFTPAccount --userName example_ftpuser cyberpanel listFTPJson --domainName example.com cyberpanel listFTPPretty --domainName example.com

DNS (PowerDNS)
Code:
cyberpanel createDNSZone --owner admin --domainName example.com cyberpanel createDNSRecord --domainName example.com --name www.example.com --recordType A --value 203.0.113.10 --priority 0 --ttl 3600 cyberpanel listDNSJson --domainName example.com cyberpanel listDNSPretty --domainName example.com cyberpanel deleteDNSRecord --recordID 12 cyberpanel listDNSZonesJson cyberpanel deleteDNSZone --domainName example.com
Get the
Code:
recordID
from listDNSJson first.

Packages and users
Code:
cyberpanel createPackage --owner admin --packageName Starter --diskSpace 10000 --bandwidth 100000 --emailAccounts 10 --dataBases 5 --ftpAccounts 5 --allowedDomains 3 cyberpanel deletePackage --packageName Starter cyberpanel listPackagesJson cyberpanel listPackagesPretty cyberpanel createUser --firstName Jane --lastName Doe --email [email protected] --userName jane --password 'StrongPass123' --websitesLimit 5 --selectedACL user --securityLevel HIGH cyberpanel editUser --userName jane --firstName Jane --lastName Doe --email [email protected] --password 'NewPass456' --securityLevel HIGH cyberpanel suspendUser --userName jane --state SUSPEND cyberpanel deleteUser --userName jane cyberpanel listUsers
Note: the CLI uses the exact name you give (
Code:
Starter
). The web form instead pre-fills the owner's name as a prefix (
Code:
admin_
), so a package made there is called
Code:
admin_Starter
. Check the real name with
Code:
listPackagesJson
before using it.

Backups
Code:
cyberpanel createBackup --domainName example.com cyberpanel restoreBackup --fileName /home/example.com/backup/backup-example.com-DATE.tar.gz
Backups land in
Code:
/home/example.com/backup/
(the CLI has a
Code:
--backupPath
option, but in 3.0 createBackup ignores it). Give restoreBackup the full path to the file. Copy backups off the server too.

Apps, maintenance and tools
Code:
cyberpanel installWordPress --domainName example.com --email [email protected] --userName wpadmin --password 'StrongPass123' --siteTitle 'My Site' cyberpanel installJoomla --domainName example.com --password 'StrongPass123' --siteTitle 'My Site' cyberpanel version cyberpanel upgrade # upgrade CyberPanel (snapshot first) cyberpanel utility # menu with handy maintenance tools cyberpanel help
Code:
switchTOLSWS
switches to LiteSpeed Enterprise and needs a paid license key (
Code:
--licenseKey
).

Panel-related commands outside the cyberpanel tool
  • Code:
    adminPass NEWPASSWORD
    : reset the panel's admin password.
  • Code:
    systemctl restart lscpd
    : restart the panel. More in checking and restarting services.

Scripting tips
  • Check the JSON:
    Code:
    cyberpanel createWebsite ... 2>/dev/null | grep -q '"success": 1' && echo OK
  • Don't put real passwords in shell history: read them into a variable first (
    Code:
    read -s PASS
    ) and use
    Code:
    --password "$PASS"
    .
  • Test on one site before looping over fifty.

More CyberPanel guides
Tested on CyberPanel 3.0 (build 8, OpenLiteSpeed edition) on Ubuntu 24.04, October 2026. Menu names can change slightly between versions.

Attached Files

Image(s)
   
Reply
Possibly Related Threads…matched by title
Replies:0Views:7

Users browsing this thread: 1 Guest(s)
Forum Jump: