Froxlor console scripts (CLI)
All froxlor cli interactions can be accessed using the bin/froxlor-cli
console command. The possible actions are listed below.
Action | Description |
---|---|
froxlor:api-call | Run an API command as given user |
froxlor:config-services | Configure system services |
froxlor:cron | Regulary perform tasks created by froxlor |
froxlor:install | Installation process to use instead of web-ui |
froxlor:php-sessionclean | Clean old php-session files from tmp folder |
froxlor:switch-server-ip | Easily switch IP addresses e.g. after server migration |
froxlor:update | Check for newer version and update froxlor |
froxlor:user | Various user actions |
froxlor:validate-acme-webroot | Validates 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:
Argument | Description |
---|---|
user | Loginname of the user you want to run the command as |
api-command | The command to execute in the form "Module.function" |
parameters | Paramaters to pass to the command as JSON array |
Options:
Option | Description |
---|---|
-s, --show-params | Show 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:
Option | Description |
---|---|
-c, --create | Create a services list configuration for the --apply option. |
-a, --apply=APPLY | Configure your services by given configuration file/string. To create one run the command with the --create option. |
-l, --list | Output the services that are going to be configured using a given config file (--apply option). No services will be configured. |
-d, --daemon=DAEMON | When 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-SETTINGS | Import settings from another froxlor installation. This can be done standalone or in addition to --apply. |
-A, --yes-to-all | Install packages without asking questions (Debian/Ubuntu only currently) |
3. Regulary perform tasks created by froxlor
Usage: bin/froxlor-cli froxlor:cron [options] [--] [<job>...]
Arguments:
Argument | Description |
---|---|
job | Job(s) to run |
Options:
Option | Description |
---|---|
-r, --run-task=RUN-TASK | Run 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, --force | Forces re-generating of config-files (webserver, nameserver, etc.) |
-d, --debug | Output debug information about what is going on to STDOUT. |
-N, --no-fork | Do 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:
Argument | Description |
---|---|
input-file | Optional JSON array file to use for unattended installations |
Options:
Option | Description |
---|---|
-p, --print-example-file | Outputs an example JSON content to be used with the input file parameter |
-c, --create-userdata-from-str=CREATE-USERDATA-FROM-STR | Creates 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:
Argument | Description |
---|---|
max-lifetime | The 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:
Option | Description |
---|---|
-s, --switch=SWITCH | Switch IP-address pair. A pair is separated by comma. For example: --switch=A,B (multiple values allowed) |
-l, --list | List 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:
Option | Description |
---|---|
-c, --check-only | Only check for newer version and exit |
-m, --mail-notify | Additionally inform administrator via email if a newer version was found |
-A, --yes-to-all | Do not ask for download, extract and database-update, just do it (if not --check-only is set) |
-i, --integer-return | Return 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:
Argument | Description |
---|---|
user | Loginname of the target user |
admin | Loginname of the executing admin/reseller user [default: "admin"] |
Options:
Option | Description |
---|---|
-u, --unlock | Unlock user after too many failed login attempts |
-p, --change-passwd | Set new password for given user |
-s, --show-info | Output 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:
Option | Description |
---|---|
-A, --yes-to-all | Do not ask for confirmation, update files if necessary |