Froxlor console scripts (CLI)

All froxlor cli interactions can be accessed using the bin/froxlor-cli console command. The possible actions are listed below.

ActionDescription
froxlor:api-callRun an API command as given user
froxlor:config-servicesConfigure system services
froxlor:cronRegulary perform tasks created by froxlor
froxlor:installInstallation process to use instead of web-ui
froxlor:php-sessioncleanClean old php-session files from tmp folder
froxlor:switch-server-ipEasily switch IP addresses e.g. after server migration
froxlor:updateCheck for newer version and update froxlor
froxlor:userVarious user actions
froxlor:validate-acme-webrootValidates the Le_Webroot value is correct for froxlor managed domains with Let's Encrypt certificate.

1. Run an API command as given user

Usage: bin/froxlor-cli froxlor:api-call [options] [--] <user> <api-command> [<parameters>]

Arguments:

ArgumentDescription
userLoginname of the user you want to run the command as
api-commandThe command to execute in the form "Module.function"
parametersParamaters to pass to the command as JSON array

Options:

OptionDescription
-s, --show-paramsShow possible parameters for given api-command (given command will not be called)

2. Configure system services

Usage: bin/froxlor-cli froxlor:config-services [options]

Options:

OptionDescription
-c, --createCreate a services list configuration for the --apply option.
-a, --apply=APPLYConfigure your services by given configuration file/string. To create one run the command with the --create option.
-l, --listOutput the services that are going to be configured using a given config file (--apply option). No services will be configured.
-d, --daemon=DAEMONWhen used with --apply you can specify one or multiple daemons. These will be the only services that get configured. (multiple values allowed)
-i, --import-settings=IMPORT-SETTINGSImport settings from another froxlor installation. This can be done standalone or in addition to --apply.
-A, --yes-to-allInstall packages without asking questions (Debian/Ubuntu only currently)

3. Regulary perform tasks created by froxlor

Usage: bin/froxlor-cli froxlor:cron [options] [--] [<job>...]

Arguments:

ArgumentDescription
jobJob(s) to run

Options:

OptionDescription
-r, --run-task=RUN-TASKRun a specific task [1 = re-generate configs, 4 = re-generate dns zones, 10 = re-set quotas, 99 = re-create cron.d-file] (multiple values allowed)
-f, --forceForces re-generating of config-files (webserver, nameserver, etc.)
-d, --debugOutput debug information about what is going on to STDOUT.
-N, --no-forkDo not fork to background (traffic cron only).

4. Installation process to use instead of web-ui

Usage: bin/froxlor-cli froxlor:install [options] [--] [<input-file>]

Arguments:

ArgumentDescription
input-fileOptional JSON array file to use for unattended installations

Options:

OptionDescription
-p, --print-example-fileOutputs an example JSON content to be used with the input file parameter
-c, --create-userdata-from-str=CREATE-USERDATA-FROM-STRCreates lib/userdata.inc.php file from string created by web-install process

5. Clean old php-session files from tmp folder

Usage: bin/froxlor-cli froxlor:php-sessionclean [<max-lifetime>]

Arguments:

ArgumentDescription
max-lifetimeThe number of seconds after which data will be seen as "garbage" and potentially cleaned up. Defaults to "1440"

6. Easily switch IP addresses e.g. after server migration

If you ever switch your servers IP address or migrate to another server, you can invoke this script to switch your old IP's with the new IP's in your froxlor installation.

Usage: bin/froxlor-cli froxlor:switch-server-ip [options]

Options:

OptionDescription
-s, --switch=SWITCHSwitch IP-address pair. A pair is separated by comma. For example: --switch=A,B (multiple values allowed)
-l, --listList all IP addresses currently added for this server in froxlor

Example usage:

Let's say your server currently has the IP address 123.10.20.30. You have migrated to a new provider and get a new IP address assigned, let's say 234.30.20.10. To switch these for your froxlor installation, run the following command:

bin/froxlor-cli froxlor:switch-server-ip --switch=123.10.20.30,234.30.20.10

7. Check for newer version and update froxlor

Usage: bin/froxlor-cli froxlor:update [options]

Options:

OptionDescription
-c, --check-onlyOnly check for newer version and exit
-m, --mail-notifyAdditionally inform administrator via email if a newer version was found
-A, --yes-to-allDo not ask for download, extract and database-update, just do it (if not --check-only is set)
-i, --integer-returnReturn integer whether a new version is available or not (implies --check-only). Useful for programmatic use.

8. Various user actions

Usage: bin/froxlor-cli froxlor:user [options] [--] <user> [<admin>]

Arguments:

ArgumentDescription
userLoginname of the target user
adminLoginname of the executing admin/reseller user [default: "admin"]

Options:

OptionDescription
-u, --unlockUnlock user after too many failed login attempts
-p, --change-passwdSet new password for given user
-s, --show-infoOutput information details of given user

9. Validate ACME webroot

If your documentroot for froxlor or the acme-challenge-directory setting has changed, run this to update existing acme.sh configuration files to reflect the new path so certificates can be renewed.

Usage: bin/froxlor-cli froxlor:validate-acme-webroot [options]

Options:

OptionDescription
-A, --yes-to-allDo not ask for confirmation, update files if necessary