Reference

freepanelctl commands

What this does: freepanelctl is freePanel's command-line tool on the server. It does a few things that can't wait for the panel, such as getting back in when you are locked out.

When you need it: rarely. Mostly when you can't sign in to the panel, or a page on these docs tells you to run one.

How to run it

  1. Connect to your server over SSH as root (how).
  2. Type the command and press Enter. Most commands run as freePanel's own user, freepanel, so they start with runuser -u freepanel --:
runuser -u freepanel -- freepanelctl version
1.2.3

Running them as the freepanel user keeps the panel's files owned by the right user. The commands marked as root below are run as root directly, without runuser.

Getting in

setup-token

runuser -u freepanel -- freepanelctl setup-token

Prints a new code for the one-time setup link, while no admin login exists yet. Open https://server.example.com:7443/setup# followed by the code. The link works once, for 24 hours. See A new link.

unlock-logins

runuser -u freepanel -- freepanelctl unlock-logins

Clears every sign-in counter, for when you typed a wrong password too many times and your login is locked. It says how many it cleared, such as 3 sign-in counters cleared.

reset-2fa

runuser -u freepanel -- freepanelctl reset-2fa admin

Turns two-factor sign-in off for one login (here admin), for when its phone or codes are lost. It says two-factor is off for admin. Sign in with the password, then set two-factor up again.

two-factor-policy

runuser -u freepanel -- freepanelctl two-factor-policy show
runuser -u freepanel -- freepanelctl two-factor-policy off

show lists, for admins, resellers and users, whether two-factor is required and how many logins have none. off stops requiring it of anyone, for when the rule locks people out.

Licence

runuser -u freepanel -- freepanelctl license status
echo YOUR-KEY | runuser -u freepanel -- freepanelctl license set-key -
runuser -u freepanel -- freepanelctl license check

A build that does not check a licence says This build does not check a licence. See Licence.

Moving accounts

runuser -u freepanel -- freepanelctl handoff status examplenet

Used on an old freePanel server during a move, to point a moved account's DNS records at its new server. You don't normally type it: the new server runs it for you from Move accounts here (how). The steps are status, lower-ttl, repoint ACCOUNT ADDRESS and undo. It needs this server's DNS to be set up.

Plugins

For people who write plugins (no server needed):

freepanelctl plugin keygen KEYFILE
freepanelctl plugin key KEYFILE
freepanelctl plugin pack FOLDER KEYFILE OUTFILE
freepanelctl plugin sign ARCHIVE KEYFILE OUTFILE

These make a signing key, show its public half, pack and sign a plugin folder, or sign an archive.

For the server's owner, as root, to choose which plugins may run a program on the server:

freepanelctl plugin key add NAME PUBLICKEY
freepanelctl plugin key remove KEY
freepanelctl plugin key list
freepanelctl plugin approve ID VERSION DIGEST
freepanelctl plugin revoke ID
freepanelctl plugin approvals

The panel can show these but never change them. See Themes and plugins.

Other commands

CommandWhat it does
freepanelctl versionPrints the freePanel version.
freepanelctl build-infoPrints what this copy was built as: its channel, and the licence service and keys it trusts.
runuser -u freepanel -- freepanelctl migrateBrings the panel's database up to date. The installer runs it for you. It says database is up to date.
freepanelctl support-mailTakes one email message on its input and hands it to the support desk. Used by the mail server, not by hand.