Command line

The commands an administrator can run on a ScalPanel server - scalpanelctl and the cPanel-style scripts in /scripts.

Most work happens in the admin panel. For the rest, a ScalPanel server has two sets of commands:

  • scalpanelctl, which installs, updates and operates the server;
  • the scripts in /scripts, with the names cPanel administrators know.

Both run as root. Use sudo or a root shell.

scalpanelctl

scalpanelctl is installed as /usr/local/sbin/scalpanelctl. Without a command it shows the status.

CommandWhat it does
scalpanelctl statusThe installed version, the release channel, the last update's result, and the state of every service
scalpanelctl versionThe installed version only
scalpanelctl updateUpdate to the newest release of the channel, after asking
scalpanelctl update --yesThe same, without asking
scalpanelctl update <version>Update to a given release, which must be newer than the installed one
scalpanelctl runtime listThe PHP versions in the signed runtime catalog, marked installed or available
scalpanelctl runtime install <id>...Install PHP versions from the catalog, for example php-8.5 (up to 10 at once)
scalpanelctl set-hostname <name>Change the panel hostname; the certificate follows
scalpanelctl set-ip <address>The server's public IPv4 address changed: DNS, FTP, the panel's server address and hosted A records move to the new one. --from <old> when the old address was already edited out of the settings file, --force behind NAT
scalpanelctl restart <service>...Restart services and wait until they are healthy
scalpanelctl reload-edgeReload the edge nginx in front of the websites; websites keep running
scalpanelctl node-bundleRe-enroll the server's node with a bundle from Servers → Nodes → Re-enroll, pasted on standard input
scalpanelctl link initSet up the private link (WireGuard, UDP 51820) for web nodes on other servers
scalpanelctl link add <node> <key> <ip> [--mail <hostname>]Link a web node or, with --mail, a mail server (its public IPv4 after the key); prints the code for its installer, and a mail server's secrets
scalpanelctl link set-ip <node> <ip>Set a linked node's public IPv4 (nodes linked by 0.1.40)
scalpanelctl link refreshRewrite the link's rules and settings for this release (needed once for calendars on mail servers installed before 0.1.48)
scalpanelctl ipv6Turn IPv6 on for a server installed before 0.1.45 (every service restarts once); the next update does it too
scalpanelctl link remove <node> / link listCut a node off the link / show the linked nodes and their last handshakes
scalpanelctl logs <service>Follow a service's log (the last 200 lines, then new ones)
scalpanelctl cleanupRemove images no container uses, such as old releases', and show free space
scalpanelctl compose <args>Run docker compose for this installation
scalpanelctl admin <args>Run the scalpanel-admin tool in the control-plane image
scalpanelctl addon install scalguard --email <address>Install the ScalGuard add-on from its signed release; --organization <name> is optional
scalpanelctl addon uninstall scalguardRemove ScalGuard; add --delete-data to delete its data too
scalpanelctl addon statusThe installed ScalGuard version
scalpanelctl installThe first installation. The installer runs it; do not run it by hand.

Services

restart and logs take these service names:

ServiceWhat it is
apiThe panels' API
workerBackground jobs: certificates, updates, the nodes' connection
panelThe panels' web server on 2083, 2087 and 2096
nodeThe node that runs the websites and the edge nginx
postgresThe panel's own database
mariadbThe customers' MariaDB server
pdnsDNS
mailPostfix, Dovecot and spam filtering
mail-dbThe mail directory's database
webmail-apiWebmail
sshgwThe customers' SSH gateway
backup-storeThe local backup store

Warning: Restarting node restarts every website for a few seconds. To apply a changed edge setting, reload-edge is enough.

Commands for servers installed as vPanel

ScalPanel was named vPanel before. These commands move a server installed under the old name to the new names. On a server installed as ScalPanel they do nothing:

  • scalpanelctl move-layout moves /etc, /var/lib, /opt and /srv to the ScalPanel names now, instead of at the next update;
  • scalpanelctl move-names moves the databases and volumes to the ScalPanel names now;
  • scalpanelctl mail-volume-cleanup empties the old mail volume after the mail move.

Until such a server has moved, vpanelctl is another name for scalpanelctl.

/scripts

/scripts links to the active release's scripts. A server that already had a real /scripts directory keeps it, and the link is not made. Every script prints its description with -h.

ScriptWhat it does
listaccts [--json]The accounts: user, primary domain, status, owner, package, domains, created
whoowns <domain>The account that owns a domain, and its status
suspendacct <username> [reason]Suspend an account: websites, mail, FTP and SSH stop
unsuspendacct <username>Lift an account's suspension
rebuildhttpdconf [username]Write every website's configuration again (or one account's) and apply it
rebuilddnsconfig [domain]Publish every DNS zone again (or one)
pkgacct <username>Back up an account now, to the server's backup storage
restartsrv <service>...Restart services and wait until healthy
upcp [--yes]Update ScalPanel to the newest release of its channel
servicestatusScalPanel's version and the state of its services

restartsrv accepts ScalPanel's service names and these cPanel names:

NameDoes
httpd, apache, nginxReloads the edge nginx
mysql, mysqld, mariadbRestarts mariadb
postgresql, postgresRestarts postgres
named, pdns, dnsRestarts pdns
exim, dovecot, mail, imap, smtpRestarts mail
cpsrvd, panelRestarts panel

The shortcuts restartsrv_httpd, restartsrv_mysql, restartsrv_postgresql, restartsrv_named, restartsrv_exim, restartsrv_dovecot and restartsrv_cpsrvd do the same.

The scripts act through the panel's own services, with the same checks as the panel. Suspensions and backups started from them are recorded in the audit log as system.

What is not on the server

  • There is no command to downgrade. Only newer releases install.
  • PHP versions come only from the signed catalog; there is no command to build PHP or pull an image from elsewhere.
  • Account creation, packages and most settings have no command. Use the admin panel or the API.