AdminsForum

CloudPanel CLI (clpctl) & Automation Guides

Guide clpctl Cheat Sheet: Useful CloudPanel Commands for Everyday Admin

Started by JAY 0 replies 187 views
1JAY
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#1
clpctl cheat sheet: CloudPanel commands you'll actually use

clpctl is CloudPanel's command-line tool. Everything you click in the CloudPanel dashboard, like creating sites, databases and SSL certificates, you can also do with one line in the terminal. That's handy when the panel won't load, when you manage many sites, or when you want to script repeat jobs.

This is a practical cheat sheet, grouped by task, with a short explanation for each command. Run them as root unless noted.

In every example, replace
Code:
YOUR-STRONG-PASSWORD
, the domain and the user names with your own.

Tip: to see every option for a command, add
Code:
--help
, for example
Code:
clpctl site:add:php --help
.

Locked out of the panel
Reset a CloudPanel user's password
Code:
clpctl user:reset:password --userName=john.doe --password='YOUR-STRONG-PASSWORD'
Turn off two-factor login for a user who lost their phone
Code:
clpctl user:disable:mfa --userName=john.doe
See all panel users
Code:
clpctl user:list

Create sites
PHP site (use
Code:
clpctl vhost-templates:list
to see template names such as Generic, WordPress or Laravel)
Code:
clpctl site:add:php --domainName=www.example.com --phpVersion=8.4 --vhostTemplate='Generic' --siteUser=john --siteUserPassword='YOUR-STRONG-PASSWORD'
Node.js site
Code:
clpctl site:add:nodejs --domainName=app.example.com --nodejsVersion=22 --appPort=3000 --siteUser=appuser --siteUserPassword='YOUR-STRONG-PASSWORD'
Python site
Code:
clpctl site:add:python --domainName=py.example.com --pythonVersion=3.12 --appPort=8090 --siteUser=pyuser --siteUserPassword='YOUR-STRONG-PASSWORD'
Static HTML site
Code:
clpctl site:add:static --domainName=static.example.com --siteUser=staticuser --siteUserPassword='YOUR-STRONG-PASSWORD'
Reverse proxy (for Docker containers or apps on another port)
Code:
clpctl site:add:reverse-proxy --domainName=tool.example.com --reverseProxyUrl='http://127.0.0.1:8000' --siteUser=tooluser --siteUserPassword='YOUR-STRONG-PASSWORD'

Delete a site (asks you to type "yes"; this removes the site's files)
Code:
clpctl site:delete --domainName=www.example.com

SSL certificates
Free Let's Encrypt certificate (for www.example.com you automatically get example.com too)
Code:
clpctl lets-encrypt:install:certificate --domainName=www.example.com
Add extra names to the same certificate
Code:
clpctl lets-encrypt:install:certificate --domainName=www.example.com --subjectAlternativeName=shop.example.com
Install your own certificate (bought SSL or Cloudflare Origin)
Code:
clpctl site:install:certificate --domainName=www.example.com --privateKey=/root/ssl/key.pem --certificate=/root/ssl/cert.pem

Databases
Create a database and user for a site
Code:
clpctl db:add --domainName=www.example.com --databaseName=shop_db --databaseUserName=shop_user --databaseUserPassword='YOUR-STRONG-PASSWORD'
Export (backup) a database, compressed because the name ends in .gz
Code:
clpctl db:export --databaseName=shop_db --file=shop_db.sql.gz
Import a database (run it in the folder where the file is)
Code:
clpctl db:import --databaseName=shop_db --file=shop_db.sql.gz
Show the MySQL master (root) login
Code:
clpctl db:show:master-credentials

Protect the CloudPanel login
Add an extra browser password in front of the panel
Code:
clpctl cloudpanel:enable:basic-auth --userName=john.doe --password='YOUR-STRONG-PASSWORD'
Remove it again
Code:
clpctl cloudpanel:disable:basic-auth

Cloudflare
Refresh Cloudflare's IP list (CloudPanel already does this daily; useful after you start using "Cloudflare only")
Code:
clpctl cloudflare:update:ips

Panel users
Add an admin user
Code:
clpctl user:add --userName='jane' --email='[email protected]' --firstName='Jane' --lastName='Doe' --password='YOUR-STRONG-PASSWORD' --role='admin' --timezone='UTC' --status='1'
Add a user who can only see certain sites (great for clients)
Code:
clpctl user:add --userName='client1' --email='[email protected]' --firstName='Client' --lastName='One' --password='YOUR-STRONG-PASSWORD' --role='user' --sites='example.com' --timezone='UTC' --status='1'
Delete a user
Code:
clpctl user:delete --userName='client1'

Safety tips
  • Put passwords in single quotes, especially if they contain
    Code:
    !
    or
    Code:
    $
    , so the shell doesn't change them.
  • Commands with a password stay in your shell history. Clear it afterwards with
    Code:
    history -c
    if other people use the server.
  • Always export a database before you import over it or delete a site.

Sources (checked October 2026): CloudPanel CLI: root user commands · CloudPanel CLI interface

New to clpctl? Start here: Getting started with the clpctl command
Reply

Messages In This Thread
clpctl Cheat Sheet: Useful CloudPanel Commands for Everyday Admin - by JAY - 10-19-2026, 02:41 PM
Possibly Related Threads…matched by title
Replies:0Views:134
Replies:0Views:224

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