CloudPanel: getting started with the clpctl command
CloudPanel comes with clpctl, a command-line tool for jobs you'd otherwise click through in the browser. You don't need it for everyday work, but it's the tool that saves you when the web interface is out of reach, and it makes repeat jobs fast and identical every time. This guide explains how clpctl is organised, how to explore it safely and which commands are worth knowing first. For a full list, keep the clpctl cheat sheet open.
Two kinds of commands: root and site user
clpctl has two groups of commands, and which user you are decides which ones work:
Explore without changing anything
List every command available to the current user:
Show the options of one command before you run it:
Commands are named (for example or ), and options use camelCase: , , .
Safe commands to try first
These only read information, so they're a good way to get comfortable. As root:
The last one prints the database master login. Treat its output like a password: don't paste it into tickets or forum posts.
As a site user, inside the site folder, a harmless one is purging the site's cache:
Commands worth knowing for emergencies
Good habits
Sources: CloudPanel: root user commands · CloudPanel: site user commands
CloudPanel comes with clpctl, a command-line tool for jobs you'd otherwise click through in the browser. You don't need it for everyday work, but it's the tool that saves you when the web interface is out of reach, and it makes repeat jobs fast and identical every time. This guide explains how clpctl is organised, how to explore it safely and which commands are worth knowing first. For a full list, keep the clpctl cheat sheet open.
Two kinds of commands: root and site user
clpctl has two groups of commands, and which user you are decides which ones work:
- Root user commands manage the whole server: sites, panel users, databases, certificates, vhost templates and panel security. Log in over SSH as root for these.
- Site user commands work inside one site: resetting file permissions, exporting and importing that site's databases, and purging its Varnish cache. Log in as the site user, or switch from root with .Code:
su - siteuser
Explore without changing anything
List every command available to the current user:
Code:
clpctl listCode:
clpctl site:add:php --helpCode:
area:actionCode:
db:exportCode:
lets-encrypt:install:certificateCode:
--domainNameCode:
--databaseNameCode:
--userNameSafe commands to try first
These only read information, so they're a good way to get comfortable. As root:
Code:
clpctl user:list
clpctl vhost-templates:list
clpctl db:show:master-credentialsAs a site user, inside the site folder, a harmless one is purging the site's cache:
Code:
clpctl varnish-cache:purge --purge=allCommands worth knowing for emergencies
- Lost the panel password: Code:
clpctl user:reset:password --userName='john.doe' --password='New-Strong-Pass' - Lost your 2FA device: Code:
clpctl user:disable:mfa --userName='john.doe' - Locked out by panel Basic Auth: Code:
clpctl cloudpanel:disable:basic-auth - Messed-up file permissions (as the site user, in the site folder): Code:
clpctl system:permissions:reset --directories=770 --files=660 --path=.
Good habits
- Put option values in single quotes, especially passwords with orCode:
!in them.Code:$
- Take a snapshot or backup before commands that change or delete things (,Code:
site:delete).Code:db:import
- Try new commands on a test site first.
- When you script clpctl, log the output so you can see failures later.
Sources: CloudPanel: root user commands · CloudPanel: site user commands

