### Perform unattended installation Source: https://docs.froxlor.org/latest/admin-guide/cli-scripts Use this script for unattended installations instead of the web UI. An optional JSON input file can be provided for configuration. Use `-p` to print an example file. ```bash bin/froxlor-cli froxlor:install [options] [--] [] ``` -------------------------------- ### Install and build frontend assets Source: https://docs.froxlor.org/latest/general/installation/source.html Install npm packages and build the javascript and css assets for froxlor. ```shell npm install npm run build ``` -------------------------------- ### Install froxlor package Source: https://docs.froxlor.org/latest/general/installation/apt-package.html Installs the froxlor package along with its dependencies, including the web server. ```shell apt install froxlor ``` -------------------------------- ### Copy Example Config File Source: https://docs.froxlor.org/latest/admin-guide/settings Copy the example configuration file to enable custom adjustments. This is typically done in the Froxlor base directory. ```bash cd /var/www/html/froxlor cp lib/config.example.inc.php lib/config.inc.php ``` -------------------------------- ### Run froxlor config-services script Source: https://docs.froxlor.org/latest/admin-guide/configuration/php-fpm Execute this command to guide through froxlor configuration, ensuring 'libnssextrausers' and 'php-fpm' are selected. ```shell cd /var/www/html/froxlor/ bin/froxlor-cli froxlor:config-services --create ``` -------------------------------- ### Example API Response for Listing Functions Source: https://docs.froxlor.org/latest/api-guide An example of the JSON response received when calling the Froxlor.listFunctions API command. ```json { "data": [ { "module": "SomeModule", "function": "someFunction", "params": [ ... ] }, { "...": "..." } ] } ``` -------------------------------- ### Add froxlor GPG key and repository for Ubuntu Source: https://docs.froxlor.org/latest/general/installation/apt-package.html Installs necessary packages, downloads the froxlor GPG key, and adds the froxlor repository to APT sources for Ubuntu systems. ```shell apt -y install apt-transport-https lsb-release ca-certificates curl gnupg curl -sSLo /usr/share/keyrings/deb.froxlor.org-froxlor.gpg https://deb.froxlor.org/froxlor.gpg sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.froxlor.org-froxlor.gpg] https://deb.froxlor.org/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/froxlor.list' ``` -------------------------------- ### Listing Available API Functions Source: https://docs.froxlor.org/latest/api-guide This example demonstrates how to list all available API functions using cURL. It shows how to construct the JSON payload and authenticate the request using an API key and secret. ```APIDOC ## POST /api.php ### Description Lists all available API functions that can be called. ### Method POST ### Endpoint `https://your-hostname.tld/api.php` ### Parameters #### Request Body - **command** (string) - Required - The command to execute, in this case 'Froxlor.listFunctions'. ### Request Example ```shell AUTH=$(echo -ne "$FROXLOR_API_KEY:$FROXLOR_API_SECRET" | base64 --wrap 0) curl -v \ --header "Content-Type: application/json" \ --header "Authorization: Basic $AUTH" \ --request POST \ --data '{"command":"Froxlor.listFunctions"}' \ https://froxlor.example.com/api.php ``` ### Response #### Success Response (200) - **data** (array) - Contains a list of available functions, each with module, function name, and parameters. #### Response Example ```json { "data": [ { "module": "SomeModule", "function": "someFunction", "params": [ ... ] }, { "...": "..." } ] } ``` ``` -------------------------------- ### Run froxlor cron for PHP-FPM configuration Source: https://docs.froxlor.org/latest/admin-guide/configuration/php-fpm After manual setup, run this command to immediately generate PHP-FPM configurations for all VirtualHosts. ```shell cd /var/www/html/froxlor bin/froxlor-cli froxlor:cron -f ``` -------------------------------- ### Backup froxlor configuration and images Source: https://docs.froxlor.org/latest/general/uninstall.html Copy the `userdata.inc.php` file and any custom header logos from the froxlor installation directory to a temporary backup location. ```shell mkdir -p /tmp/froxlor-backup/ cp /var/www/html/froxlor/lib/userdata.inc.php /tmp/froxlor-backup/ cp /var/www/html/froxlor/img/* /tmp/froxlor-backup/ ``` -------------------------------- ### Add froxlor GPG key and repository for Debian Source: https://docs.froxlor.org/latest/general/installation/apt-package.html Installs necessary packages, downloads the froxlor GPG key, and adds the froxlor repository to APT sources for Debian systems. ```shell apt -y install apt-transport-https lsb-release ca-certificates curl gnupg curl -sSLo /usr/share/keyrings/deb.froxlor.org-froxlor.gpg https://deb.froxlor.org/froxlor.gpg sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.froxlor.org-froxlor.gpg] https://deb.froxlor.org/debian $(lsb_release -sc) main" > /etc/apt/sources.list.d/froxlor.list' ``` -------------------------------- ### Generate Password using Froxlor CLI Source: https://docs.froxlor.org/latest/general/migration-guide/2.0.html Use the froxlor-cli to generate a password with a specified length. This is an example of interacting with the Froxlor API via the command line. ```shell bin/froxlor-cli froxlor:api-call admin Froxlor.generatePassword '{"length":20}' ``` ```json { "data": "aUP6wfigEr5p84dB7lvO" } ``` -------------------------------- ### Install composer dependencies Source: https://docs.froxlor.org/latest/general/installation/source.html Download required libraries for froxlor using composer. The '--no-dev' flag excludes development dependencies. ```shell composer install --no-dev ``` -------------------------------- ### UFW Firewall Rules for Froxlor Services Source: https://docs.froxlor.org/latest/admin-guide/service-ports Example UFW (Uncomplicated Firewall) rules to allow essential traffic for Froxlor and associated services. This includes HTTP/HTTPS, DNS, SSH, FTP, IMAP, POP3, and SMTP. ```bash # Allow HTTP and HTTPS traffic (required for websites + froxlor) sudo ufw allow 80,443/tcp # Allow DNS access (required for DNS servers) sudo ufw allow 53/tcp # Allow SSH access (required for server administration) sudo ufw allow 22/tcp # Allow FTP traffic (only if FTP is actually used) # The second rule is required for PassivePorts, adjust to your config! sudo ufw allow 21/tcp sudo ufw allow 49152:65534/tcp # Allow IMAP and IMAPS (if users connect via mail clients) sudo ufw allow 143,993/tcp # Allow POP3 and POP3S (only if POP3 support is needed) sudo ufw allow 110,995/tcp # Allow SMTP inbound + submission ports (required for mail servers) sudo ufw allow 25,465,587/tcp ``` -------------------------------- ### Stop cron job during manual installation Source: https://docs.froxlor.org/latest/admin-guide/configuration/php-fpm Temporarily stop the froxlor cron job to prevent conflicts during manual PHP-FPM setup. ```shell service cron stop ``` -------------------------------- ### Show configuration differences/updates Source: https://docs.froxlor.org/latest/admin-guide/cli-scripts Compare configuration templates between OS versions. Use the `-l` option to list all available OS versions for comparison. ```bash bin/froxlor-cli froxlor:config-diff [options] [--] [ []] ``` -------------------------------- ### Update package list and upgrade installed packages Source: https://docs.froxlor.org/latest/general/installation/apt-package.html Refreshes the APT package list and upgrades all installed packages to their latest versions. ```shell apt update && apt upgrade ``` -------------------------------- ### Froxlor.listSettings Source: https://docs.froxlor.org/latest/api-guide/commands/froxlor.html Returns a list of all available settings. Requires admin permission. ```APIDOC ## Froxlor.listSettings ### Description Return a list of all settings. ### Permission `admin` ### Response #### Success Response - `string` as `json-encoded array count|list` ``` -------------------------------- ### Configure system services Source: https://docs.froxlor.org/latest/admin-guide/cli-scripts Manage system services using a configuration file or string. Use `--create` to generate a configuration, and `--apply` to apply it. Multiple daemons can be specified with `-d`. ```bash bin/froxlor-cli froxlor:config-services [options] ``` -------------------------------- ### Customers.add Source: https://docs.froxlor.org/latest/api-guide/commands/customers.html Creates a new customer with default FTP user and standard subdomain if specified. ```APIDOC ## Customers.add ### Description Creates a new customer with default FTP user and standard subdomain (if wanted). ### Permission `admin` ``` -------------------------------- ### Create Hosting Plan Source: https://docs.froxlor.org/latest/api-guide/commands/hostingplans.html Creates a new hosting plan with specified configurations. All parameters are optional and have default values. ```APIDOC ## HostingPlans.create ### Description Creates a new hosting plan with specified configurations. All parameters are optional and have default values. ### Method POST ### Endpoint /hostingplans ### Parameters #### Request Body - **id** (int) - optional - the hosting-plan-id - **planname** (string) - optional - the hosting-plan-name - **name** (string) - optional - name of the plan - **description** (string) - optional - description for hosting-plan - **diskspace** (int) - optional - disk-space available for customer in MB, default 0 - **diskspace_ul** (bool) - optional - whether customer should have unlimited diskspace, default 0 (false) - **traffic** (int) - optional - traffic available for customer in GB, default 0 - **traffic_ul** (bool) - optional - whether customer should have unlimited traffic, default 0 (false) - **subdomains** (int) - optional - amount of subdomains available for customer, default 0 - **subdomains_ul** (bool) - optional - whether customer should have unlimited subdomains, default 0 (false) - **emails** (int) - optional - amount of emails available for customer, default 0 - **emails_ul** (bool) - optional - whether customer should have unlimited emails, default 0 (false) - **email_accounts** (int) - optional - amount of email-accounts available for customer, default 0 - **email_accounts_ul** (bool) - optional - whether customer should have unlimited email-accounts, default 0 (false) - **email_forwarders** (int) - optional - amount of email-forwarders available for customer, default 0 - **email_forwarders_ul** (bool) - optional - whether customer should have unlimited email-forwarders, default 0 (false) - **email_quota** (int) - optional - size of email-quota available for customer in MB, default is system-setting mail_quota - **email_quota_ul** (bool) - optional - whether customer should have unlimited email-quota, default 0 (false) - **email_imap** (bool) - optional - whether to allow IMAP access, default 0 (false) - **email_pop3** (bool) - optional - whether to allow POP3 access, default 0 (false) - **ftps** (int) - optional - amount of ftp-accounts available for customer, default 0 - **ftps_ul** (bool) - optional - whether customer should have unlimited ftp-accounts, default 0 (false) - **mysqls** (int) - optional - amount of mysql-databases available for customer, default 0 - **mysqls_ul** (bool) - optional - whether customer should have unlimited mysql-databases, default 0 (false) - **phpenabled** (bool) - optional - whether to allow usage of PHP, default 0 (false) - **allowed_phpconfigs** (array) - optional - array of IDs of php-config that the customer is allowed to use, default empty (none) - **perlenabled** (bool) - optional - whether to allow usage of Perl/CGI, default 0 (false) - **dnsenabled** (bool) - optional - either to allow usage of the DNS editor (requires activated nameserver in settings),default 0 (false) - **logviewenabled** (bool) - optional - either to allow access to webserver access/error-logs, default 0 (false) ### Response #### Success Response (200) - **string** (string) - JSON-encoded array of hosting plan details ``` -------------------------------- ### Froxlor API Response Structure (Single Entity) Source: https://docs.froxlor.org/latest/api-guide The structure for responses from Froxlor API 'get', 'add', 'update', or 'delete' methods, returning a single entity. ```json { "data": {...} } ``` -------------------------------- ### Enable Apache HTTP/2 and mpm_event Source: https://docs.froxlor.org/latest/admin-guide/settings-you-might-want Disables PHP modules and prefork MPM, then enables HTTP/2 and mpm_event for Apache. Requires PHP-FPM or FCGId. Run as root. ```shell a2dismod php* mpm_prefork a2enmod http2 mpm_event ``` -------------------------------- ### Customers.create Source: https://docs.froxlor.org/latest/api-guide/commands/customers.html Creates a new customer with specified details. Many parameters are optional and have default values or can be inferred from system settings. ```APIDOC ## Customers.create ### Description Creates a new customer with specified details. Many parameters are optional and have default values or can be inferred from system settings. ### Method POST ### Endpoint /api/v1/customers ### Parameters #### Request Body - **email** (string) - required, email address of new customer - **name** (string) - optional if company is set, else required - **firstname** (string) - optional if company is set, else required - **company** (string) - optional but required if name/firstname empty - **street** (string) - optional - **zipcode** (string) - optional - **city** (string) - optional - **phone** (string) - optional - **fax** (string) - optional - **customernumber** (int) - optional - **def_language** (string) - optional, ISO 639-1 language code (e.g. 'en', 'de', see lng-folder for supported languages),default is system-default language - **gui_access** (bool) - optional, allow login via webui, if false ONLY the login via webui is disallowed; default true - **api_allowed** (bool) - optional, default is true if system setting api.enabled is true, else false - **shell_allowed** (bool) - optional, default is true if system setting system.allow_customer_shell is true, else false - **gender** (int) - optional, 0 = no-gender, 1 = male, 2 = female - **custom_notes** (string) - optional notes - **custom_notes_show** (bool) - optional, whether to show the content of custom_notes to the customer, default 0(false) - **new_loginname** (string) - optional, if empty generated automatically using customer-prefix and increasingnumber - **new_customer_password** (string) - optional, if empty generated automatically and send to the customer's email if$sendpassword is 1 - **sendpassword** (bool) - optional, whether to send the password to the customer after creation, default 0(false) - **diskspace** (int) - optional disk-space available for customer in MB, default 0 - **diskspace_ul** (bool) - optional, whether customer should have unlimited diskspace, default 0 (false) - **traffic** (int) - optional traffic available for customer in GB, default 0 - **traffic_ul** (bool) - optional, whether customer should have unlimited traffic, default 0 (false) - **subdomains** (int) - optional amount of subdomains available for customer, default 0 - **subdomains_ul** (bool) - optional, whether customer should have unlimited subdomains, default 0 (false) - **emails** (int) - optional amount of emails available for customer, default 0 - **emails_ul** (bool) - optional, whether customer should have unlimited emails, default 0 (false) - **email_accounts** (int) - optional amount of email-accounts available for customer, default 0 - **email_accounts_ul** (bool) - optional, whether customer should have unlimited email-accounts, default 0 (false) - **email_forwarders** (int) - optional amount of email-forwarders available for customer, default 0 - **email_forwarders_ul** (bool) - optional, whether customer should have unlimited email-forwarders, default 0 (false) - **email_quota** (int) - optional size of email-quota available for customer in MB, default is system-settingmail_quota - **email_quota_ul** (bool) - optional, whether customer should have unlimited email-quota, default 0 (false) - **email_imap** (bool) - optional, whether to allow IMAP access, default 0 (false) - **email_pop3** (bool) - optional, whether to allow POP3 access, default 0 (false) - **ftps** (int) - optional amount of ftp-accounts available for customer, default 0 - **ftps_ul** (bool) - optional, whether customer should have unlimited ftp-accounts, default 0 (false) - **mysqls** (int) - optional amount of mysql-databases available for customer, default 0 - **mysqls_ul** (bool) - optional, whether customer should have unlimited mysql-databases, default 0 (false) - **createstdsubdomain** (bool) - optional, whether to create a standard-subdomain ([loginname].froxlor-hostname.tld),default [system.createstdsubdom_default] - **phpenabled** (bool) - optional, whether to allow usage of PHP, default 0 (false) - **allowed_phpconfigs** (array) - optional, array of IDs of php-config that the customer is allowed to use, defaultempty (none) - **perlenabled** (bool) - optional, whether to allow usage of Perl/CGI, default 0 (false) - **dnsenabled** (bool) - optional, whether to allow usage of the DNS editor (requires activated nameserver insettings), default 0 (false) - **logviewenabled** (bool) - optional, whether to allow access to webserver access/error-logs, default 0 (false) - **store_defaultindex** (bool) - optional, whether to store the default index file to customers homedir - **hosting_plan_id** (int) - optional, specify a hosting-plan to set certain resource-values from the planinstead of specifying them - **allowed_mysqlserver** (array) - optional, array of IDs of defined mysql-servers the customer is allowed to use,default is to allow the default dbserver (id=0) ### Response #### Success Response (200) - **string** (string) - JSON-encoded array of created customer data ``` -------------------------------- ### Navigate to web root directory Source: https://docs.froxlor.org/latest/general/installation/source.html Change the current directory to the web server's root directory before cloning the repository. ```shell cd /var/www/html/ ``` -------------------------------- ### Run Froxlor Config Services Script Source: https://docs.froxlor.org/latest/admin-guide/configuration/fcgid Execute the froxlor-cli script to create services configurations. Ensure 'libnssextrausers' and 'fcgid' are selected during the 'SYSTEM' configuration. ```shell cd /var/www/html/froxlor bin/froxlor-cli froxlor:config-services --create ``` -------------------------------- ### MysqlServer.add Source: https://docs.froxlor.org/latest/api-guide/commands/mysqlserver.html Adds a new MySQL server configuration to the system. Requires administrator privileges. ```APIDOC ## MysqlServer.add ### Description Adds a new MySQL server configuration. ### Permission `admin` ### Parameters #### Request Body - **mysql_host** (string) - Required - IP or hostname of the MySQL server. - **mysql_port** (string) - Optional - Port to connect to. - **mysql_ca** (string) - Optional - Path to the certificate file. - **mysql_verifycert** (string) - Optional - Verify server certificate. - **privileged_user** (string) - Required - Privileged user on the MySQL server (must have GRANT privileges). - **privileged_password** (string) - Required - Password of the privileged user. - **description** (string) - Optional - Description for the server. - **allow_all_customers** (bool) - Optional - Add this configuration to every existing customer's allowed MySQL server list. Defaults to false. - **test_connection** (bool) - Optional - Test connection with given credentials. Defaults to true. ### Response `string` as `json-encoded array` ``` -------------------------------- ### Log in to MySQL Source: https://docs.froxlor.org/latest/general/installation/tarball.html Connect to the MySQL server as the root user to perform administrative tasks like creating new users. ```shell mysql -u root ``` -------------------------------- ### HostingPlans.add Source: https://docs.froxlor.org/latest/api-guide/commands/hostingplans.html Adds a new hosting plan. Requires admin permission. Allows configuration of various plan features like disk space, traffic, subdomains, emails, etc. ```APIDOC ## HostingPlans.add ### Description Adds a new hosting plan. Requires admin permission. Allows configuration of various plan features like disk space, traffic, subdomains, emails, etc. ### Permission `admin` ### Parameters #### Request Body - **name** (string) - Required - The name of the hosting plan. - **description** (string) - Optional - A description for the hosting plan. - **diskspace** (int) - Optional - Disk space available for the customer in MB (default 0). - **diskspace_ul** (bool) - Optional - Whether the customer should have unlimited disk space (default false). - **traffic** (int) - Optional - Traffic available for the customer in GB (default 0). - **traffic_ul** (bool) - Optional - Whether the customer should have unlimited traffic (default false). - **subdomains** (int) - Optional - Amount of subdomains available for the customer (default 0). - **subdomains_ul** (bool) - Optional - Whether the customer should have unlimited subdomains (default false). - **emails** (int) - Optional - Amount of emails available for the customer (default 0). - **emails_ul** (bool) - Optional - Whether the customer should have unlimited emails (default false). - **email_accounts** (int) - Optional - Amount of email accounts available for the customer (default 0). - **email_accounts_ul** (bool) - Optional - Whether the customer should have unlimited email accounts (default false). - **email_forwarders** (int) - Optional - Amount of email forwarders available for the customer (default 0). - **email_forwarders_ul** (bool) - Optional - Whether the customer should have unlimited email forwarders (default false). - **email_quota** (int) - Optional - Size of email quota available for the customer in MB (default is system-setting mail_quota). - **email_quota_ul** (bool) - Optional - Whether the customer should have unlimited email quota (default false). - **email_imap** (bool) - Optional - Whether to allow IMAP access (default false). - **email_pop3** (bool) - Optional - Whether to allow POP3 access (default false). - **ftps** (int) - Optional - Amount of FTP accounts available for the customer (default 0). - **ftps_ul** (bool) - Optional - Whether the customer should have unlimited FTP accounts (default false). - **mysqls** (int) - Optional - Amount of MySQL databases available for the customer (default 0). - **mysqls_ul** (bool) - Optional - Whether the customer should have unlimited MySQL databases (default false). - **phpenabled** (bool) - Optional - Whether to allow usage of PHP (default false). - **allowed_phpconfigs** (array) - Optional - An array of IDs of PHP configurations that the customer is allowed to use (default empty). - **perlenabled** (bool) - Optional - Whether to allow usage of Perl/CGI (default false). - **dnsenabled** (bool) - Optional - Whether to allow usage of the DNS editor (requires activated nameserver in settings) (default false). - **logviewenabled** (bool) - Optional - Whether to allow access to webserver access/error logs (default false). ### Response #### Success Response Returns a JSON-encoded array. ``` -------------------------------- ### MysqlServer.listing Source: https://docs.froxlor.org/latest/api-guide/commands/mysqlserver.html Lists all available MySQL server configurations. Accessible by administrators and customers. ```APIDOC ## MysqlServer.listing ### Description Lists available MySQL servers. ### Permission `admin`, `customer` ### Response `string` as `json-encoded array` ``` -------------------------------- ### Navigate to froxlor directory Source: https://docs.froxlor.org/latest/general/installation/source.html Change the current directory into the cloned froxlor repository to manage its dependencies. ```shell cd /var/www/html/froxlor ``` -------------------------------- ### Froxlor.getSetting Source: https://docs.froxlor.org/latest/api-guide/commands/froxlor.html Retrieves a specific setting using a setting group and variable name. Requires admin permission. ```APIDOC ## Froxlor.getSetting ### Description Return a setting by settinggroup.varname couple. ### Permission `admin` ### Parameters #### Query Parameters - **key** (string) - Required - settinggroup.varname couple ### Response #### Success Response - `string` ``` -------------------------------- ### PhpSettings.add Source: https://docs.froxlor.org/latest/api-guide/commands/phpsettings.html Adds a new PHP-settings entry. ```APIDOC ## PhpSettings.add ### Description Adds a new PHP-settings entry. ### Permission `admin` ### Parameters #### Request Body - **description** (string) - Required - Description of the PHP config. - **phpsettings** (string) - Required - The actual ini-settings. - **binary** (string) - Optional - The binary to php-cgi if FCGID is used. - **file_extensions** (string) - Optional - Allowed PHP file extensions if FCGID is used. Defaults to 'php'. - **mod_fcgid_starter** (int) - Optional - Number of fcgid-starters if FCGID is used. Defaults to -1. - **mod_fcgid_maxrequests** (int) - Optional - Number of fcgid-maxrequests if FCGID is used. Defaults to -1. - **mod_fcgid_umask** (string) - Optional - Umask if FCGID is used. Defaults to '022'. - **fpmconfig** (int) - Optional - ID of the fpm-daemon-config if FPM is used. - **phpfpm_enable_slowlog** (bool) - Optional - Whether to write a slowlog or not if FPM is used. Defaults to 0 (false). - **phpfpm_reqtermtimeout** (string) - Optional - Request terminate timeout if FPM is used. Defaults to '60s'. - **phpfpm_reqslowtimeout** (string) - Optional - Request slowlog timeout if FPM is used. Defaults to '5s'. - **pass_authorizationheader** (bool) - Optional - Whether to pass authorization header to webserver if FPM/FCGID is used. Defaults to 0 (false). - **override_fpmconfig** (bool) - Optional - Whether to override fpm-daemon-config value for the following settings if FPM is used. Defaults to 0 (false). - **pm** (string) - Optional - Process manager to use if FPM is used (allowed values are 'static', 'dynamic', and 'ondemand'). Defaults to the fpm-daemon-value. - **max_children** (int) - Optional - Number of max children if FPM is used. Defaults to the fpm-daemon-value. - **start_server** (int) - Optional - Number of servers to start if FPM is used. Defaults to the fpm-daemon-value. - **min_spare_servers** (int) - Optional - Number of minimum spare servers if FPM is used. Defaults to the fpm-daemon-value. - **max_spare_servers** (int) - Optional - Number of maximum spare servers if FPM is used. Defaults to the fpm-daemon-value. - **max_requests** (int) - Optional - Number of maximum requests if FPM is used. Defaults to the fpm-daemon-value. - **idle_timeout** (int) - Optional - Number of seconds for idle-timeout if FPM is used. Defaults to the fpm-daemon-value. - **limit_extensions** (string) - Optional - Limitation of php-file-extensions if FPM is used. Defaults to the fpm-daemon-value. - **allow_all_customers** (bool) - Optional - Add this configuration to the list of every existing customer's allowed-fpm-config list. Defaults to false (no). ### Response #### Success Response (200) - **id** (int) - The ID of the newly created PHP setting. ### Request Example ```json { "description": "My Custom PHP Settings", "phpsettings": "memory_limit = 256M\npost_max_size = 64M", "binary": "/usr/bin/php-cgi", "file_extensions": "php,php7", "phpfpm_enable_slowlog": true, "phpfpm_reqtermtimeout": "120s" } ``` ### Response Example ```json { "id": 2 } ``` ``` -------------------------------- ### Run Froxlor Configuration Script Source: https://docs.froxlor.org/latest/admin-guide/configuration Execute the froxlor:config-services command from the CLI to automatically configure services. This script prompts for system details and service selections. ```bash # change to your froxlor installation directory cd /var/www/html/froxlor # run the config-services command bin/froxlor-cli froxlor:config-services --create ``` -------------------------------- ### Admins.add Source: https://docs.froxlor.org/latest/api-guide/commands/admins.html Creates a new admin user with specified details and permissions. ```APIDOC ## Admins.add ### Description Creates a new admin user with specified details and permissions. ### Permission `admin` ### Parameters #### Request Body - **name** (string) - Required - Name of the administrator. - **email** (string) - Required - Email address of the administrator. - **new_loginname** (string) - Required - Login name/username of the administrator. - **admin_password** (string) - Optional - Password for the administrator; defaults to auto-generated. - **def_language** (string) - Optional - ISO 639-1 language code (e.g., 'en', 'de'); defaults to system-default language. - **gui_access** (bool) - Optional - Allows login via web UI; defaults to true. - **api_allowed** (bool) - Optional - Defaults to true if system setting `api.enabled` is true, otherwise false. - **custom_notes** (string) - Optional - Custom notes for the administrator; defaults to empty. - **custom_notes_show** (bool) - Optional - Whether to show custom notes; defaults to false. - **diskspace** (int) - Optional - Disk space limit; defaults to 0. - **diskspace_ul** (bool) - Optional - Whether disk space is unlimited; defaults to false. - **traffic** (int) - Optional - Traffic limit; defaults to 0. - **traffic_ul** (bool) - Optional - Whether traffic is unlimited; defaults to false. - **customers** (int) - Optional - Number of customers allowed; defaults to 0. - **customers_ul** (bool) - Optional - Whether customer count is unlimited; defaults to false. - **domains** (int) - Optional - Number of domains allowed; defaults to 0. - **domains_ul** (bool) - Optional - Whether domain count is unlimited; defaults to false. - **subdomains** (int) - Optional - Number of subdomains allowed; defaults to 0. - **subdomains_ul** (bool) - Optional - Whether subdomain count is unlimited; defaults to false. - **emails** (int) - Optional - Number of email accounts allowed; defaults to 0. - **emails_ul** (bool) - Optional - Whether email account count is unlimited; defaults to false. - **email_accounts** (int) - Optional - Number of email accounts allowed; defaults to 0. - **email_accounts_ul** (bool) - Optional - Whether email account count is unlimited; defaults to false. - **email_forwarders** (int) - Optional - Number of email forwarders allowed; defaults to 0. - **email_forwarders_ul** (bool) - Optional - Whether email forwarder count is unlimited; defaults to false. - **email_quota** (int) - Optional - Email quota in MB; defaults to 0. - **email_quota_ul** (bool) - Optional - Whether email quota is unlimited; defaults to false. - **ftps** (int) - Optional - Number of FTP accounts allowed; defaults to 0. - **ftps_ul** (bool) - Optional - Whether FTP account count is unlimited; defaults to false. - **mysqls** (int) - Optional - Number of MySQL databases allowed; defaults to 0. - **mysqls_ul** (bool) - Optional - Whether MySQL database count is unlimited; defaults to false. - **customers_see_all** (bool) - Optional - Whether the admin can see all customers; defaults to false. - **caneditphpsettings** (bool) - Optional - Whether the admin can edit PHP settings; defaults to false. - **change_serversettings** (bool) - Optional - Whether the admin can change server settings; defaults to false. - **ipaddress** (array) - Optional - List of IP address IDs; defaults to -1 (all IPs). ### Response #### Success Response Returns a JSON-encoded array. ``` -------------------------------- ### Set Web Server Permissions Source: https://docs.froxlor.org/latest/general/installation/tarball.html Ensure the web server has the correct ownership of the froxlor files. Replace '[webserver-user]' with your actual web server user (e.g., www-data or apache). ```bash chown -R [webserver-user]:[webserver-user] /var/www/html/froxlor/ ``` -------------------------------- ### Froxlor.importSettings Source: https://docs.froxlor.org/latest/api-guide/commands/froxlor.html Imports settings from a JSON string. Requires admin permission. ```APIDOC ## Froxlor.importSettings ### Description Import settings. ### Permission `admin` ### Parameters #### Query Parameters - **json_str** (string) - Required - content of exported froxlor-settings json file ### Response #### Success Response - `string` as `json-encoded bool` ``` -------------------------------- ### HostingPlans.get Source: https://docs.froxlor.org/latest/api-guide/commands/hostingplans.html Retrieves a specific hosting plan by its ID or name. Requires admin permission. ```APIDOC ## HostingPlans.get ### Description Retrieves a specific hosting plan by its ID or name. Requires admin permission. ### Permission `admin` ### Parameters #### Query Parameters - **id** (int) - Optional - The hosting plan ID. - **planname** (string) - Optional - The hosting plan name. ### Response #### Success Response Returns a JSON-encoded array representing the hosting plan. ``` -------------------------------- ### DirOptions.add Source: https://docs.froxlor.org/latest/api-guide/commands/diroptions.html Adds options for a given directory. Requires 'admin' or 'customer' permission. Parameters include customer ID or login name (if admin), path, and various option flags and error file paths. ```APIDOC ## DirOptions.add ### Description Adds options for a given directory. ### Permission `admin` `customer` ### Parameters #### Path Parameters - **customerid** (int) - Optional, required when called as admin (if $loginname is not specified) - **loginname** (string) - Optional, required when called as admin (if $customerid is not specified) - **path** (string) - Path relative to the customer's home-Directory - **options_indexes** (bool) - Optional, activate directory-listing for this path, default 0 (false) - **options_cgi** (bool) - Optional, allow Perl/CGI execution, default 0 (false) - **error404path** (string) - Optional, custom 404 error string/file - **error403path** (string) - Optional, custom 403 error string/file - **error500path** (string) - Optional, custom 500 error string/file ### Response `string` as `json-encoded array` ``` -------------------------------- ### Domains.add Source: https://docs.froxlor.org/latest/api-guide/commands/domains.html Adds a new domain entry to the system. ```APIDOC ## Domains.add ### Description Adds a new domain entry to the system. ### Permission `admin` ``` -------------------------------- ### Configure Froxlor VirtualHost for FCGID Source: https://docs.froxlor.org/latest/admin-guide/configuration/fcgid Set froxlor to use FCGID for its own host. This ensures the froxlor interface also benefits from FCGID. ```text Froxlor VirtualHost settings Make froxlor directly accessible by hostname: Yes Use FCGID in froxlor host: Yes Save ``` -------------------------------- ### PhpSettings.listing Source: https://docs.froxlor.org/latest/api-guide/commands/phpsettings.html Lists all PHP-setting entries. Supports filtering and pagination. ```APIDOC ## PhpSettings.listing ### Description Lists all php-setting entries. Supports filtering and pagination. ### Permission `admin` ### Parameters #### Query Parameters - **with_subdomains** (bool) - Optional - If true, also include subdomains to the list of domains that use the config. Defaults to 0 (false). - **sql_search** (array) - Optional - An array with index = fieldname, and value = array with 'op' => operator (one of <, >, or =) and 'value' => searchvalue. LIKE is used if left empty. - **sql_limit** (int) - Optional - Specify the number of results to be returned. - **sql_offset** (int) - Optional - Specify the offset for the result set. - **sql_orderby** (array) - Optional - An array with index = fieldname and value = ASC/DESC to order the result set by one or more fields. ### Response #### Success Response (200) - **count** (int) - The total number of entries found. - **list** (array) - A list of PHP setting entries. ### Response Example ```json { "count": 1, "list": [ { "id": 1, "description": "Default PHP Settings", "phpsettings": "...", "binary": "/usr/bin/php-cgi", "file_extensions": "php", "mod_fcgid_starter": -1, "mod_fcgid_maxrequests": -1, "mod_fcgid_umask": "022", "fpmconfig": 0, "phpfpm_enable_slowlog": false, "phpfpm_reqtermtimeout": "60s", "phpfpm_reqslowtimeout": "5s", "pass_authorizationheader": false, "override_fpmconfig": false, "pm": "dynamic", "max_children": 50, "start_server": 2, "min_spare_servers": 1, "max_spare_servers": 5, "max_requests": 500, "idle_timeout": 300, "limit_extensions": "php", "allow_all_customers": false } ] } ``` ``` -------------------------------- ### Backup froxlor database Source: https://docs.froxlor.org/latest/general/uninstall.html Back up the froxlor database to a SQL file. Ensure you know the database name, which is 'froxlor' by default, or check `froxlor/lib/userdata.inc.php`. ```shell mysqldump -u root -p froxlor > /tmp/backup_froxlor-YYYYMMDD.sql ``` -------------------------------- ### Customers.create Source: https://docs.froxlor.org/latest/api-guide/commands/customers.html Creates a new customer entry with the specified details. All parameters are optional, but certain fields become required if others are not provided (e.g., name/firstname are required if company is not set). ```APIDOC ## Customers.create ### Description Creates a new customer entry with the specified details. All parameters are optional, but certain fields become required if others are not provided (e.g., name/firstname are required if company is not set). ### Method POST ### Endpoint /customers ### Parameters #### Request Body - **id** (int) - optional - the customer-id - **loginname** (string) - optional - the loginname - **email** (string) - optional - **name** (string) - optional if company is set, else required - **firstname** (string) - optional if company is set, else required - **company** (string) - optional but required if name/firstname empty - **street** (string) - optional - **zipcode** (string) - optional - **city** (string) - optional - **phone** (string) - optional - **fax** (string) - optional - **customernumber** (int) - optional - **def_language** (string) - optional, ISO 639-1 language code (e.g. 'en', 'de', see lng-folder for supported languages),default is system-default language - **gui_access** (bool) - optional, allow login via webui, if false ONLY the login via webui is disallowed; default true - **api_allowed** (bool) - optional, default is true if system setting api.enabled is true, else false - **shell_allowed** (bool) - optional, default is true if system setting system.allow_customer_shell is true, else false - **gender** (int) - optional, 0 = no-gender, 1 = male, 2 = female - **custom_notes** (string) - optional notes - **custom_notes_show** (bool) - optional, whether to show the content of custom_notes to the customer, default 0(false) - **new_customer_password** (string) - optional, set new password - **sendpassword** (bool) - optional, whether to send the password to the customer after creation, default 0(false) - **move_to_admin** (int) - optional, if valid admin-id is given here, the customer's admin/reseller can bechanged - **deactivated** (bool) - optional, if 1 (true) the customer can be deactivated/suspended - **diskspace** (int) - optional disk-space available for customer in MB, default 0 - **diskspace_ul** (bool) - optional, whether customer should have unlimited diskspace, default 0 (false) - **traffic** (int) - optional traffic available for customer in GB, default 0 - **traffic_ul** (bool) - optional, whether customer should have unlimited traffic, default 0 (false) - **subdomains** (int) - optional amount of subdomains available for customer, default 0 - **subdomains_ul** (bool) - optional, whether customer should have unlimited subdomains, default 0 (false) - **emails** (int) - optional amount of emails available for customer, default 0 - **emails_ul** (bool) - optional, whether customer should have unlimited emails, default 0 (false) - **email_accounts** (int) - optional amount of email-accounts available for customer, default 0 - **email_accounts_ul** (bool) - optional, whether customer should have unlimited email-accounts, default 0 (false) - **email_forwarders** (int) - optional amount of email-forwarders available for customer, default 0 - **email_forwarders_ul** (bool) - optional, whether customer should have unlimited email-forwarders, default 0 (false) - **email_quota** (int) - optional size of email-quota available for customer in MB, default is system-settingmail_quota - **email_quota_ul** (bool) - optional, whether customer should have unlimited email-quota, default 0 (false) - **email_imap** (bool) - optional, whether to allow IMAP access, default 0 (false) - **email_pop3** (bool) - optional, whether to allow POP3 access, default 0 (false) - **ftps** (int) - optional amount of ftp-accounts available for customer, default 0 - **ftps_ul** (bool) - optional, whether customer should have unlimited ftp-accounts, default 0 (false) - **mysqls** (int) - optional amount of mysql-databases available for customer, default 0 - **mysqls_ul** (bool) - optional, whether customer should have unlimited mysql-databases, default 0 (false) - **createstdsubdomain** (bool) - optional, whether to create a standard-subdomain ([loginname].froxlor-hostname.tld),default 1 (if customer has std-subdomain) else 0 (false) - **phpenabled** (bool) - optional, whether to allow usage of PHP, default 0 (false) - **allowed_phpconfigs** (array) - optional, array of IDs of php-config that the customer is allowed to use, defaultempty (none) - **perlenabled** (bool) - optional, whether to allow usage of Perl/CGI, default 0 (false) - **dnsenabled** (bool) - optional, whether to allow usage of the DNS editor (requires activated nameserver insettings), default 0 (false) - **logviewenabled** (bool) - optional, whether to allow access to webserver access/error-logs, default 0 (false) - **theme** (string) - optional, change theme - **allowed_mysqlserver** (array) - optional, array of IDs of defined mysql-servers the customer is allowed to use,default is to allow the default dbserver (id=0) ### Response #### Success Response (200) - **string** (string) - JSON-encoded array representing the result. ```