The server_pref utility is used to manage Plesk default interface preferences and Plesk server system preferences.

Usage

server_pref <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]

Example

The following command sets the Plesk server host name to host.example.com, enables inclusion of databases in the disk space usage calculation, and enables inclusion of only outbound traffic in the traffic calculation.

plesk bin server_pref --update -hostname host.example.com -include-databases true -traffic-direction out

Commands

Command Parameter Description Example
--set-default or -sd   Sets default server-wide parameters.

To set Plesk server’s default locale to English (United States):

plesk bin server_pref --set-default -locale en-US

or

plesk bin server_pref -sd -locale en-US

--locales-list or -ll   Displays the list of available supported interface languages (locales).

To view the list of available interface languages (locales):

plesk bin server_pref --locales-list

or

plesk bin server_pref -ll

--skins-list or -sl   Displays the list of available Plesk skins.

To view the list of available skins:

plesk bin server_pref --skins-list

or

plesk bin server_pref -sl

--templates-list or -tl   Displays the list of available interface customization templates.

To view the list of available interface customization templates:

plesk bin server_pref --templates-list

or

plesk bin server_pref -tl

--update or -u   Updates Plesk server preferences.

To set the host name to host.example.com:

plesk bin server_pref --update -hostname host.example.com

or

plesk bin server_pref -u -hostname host.example.com

--show or -s   Displays the currently configured server preferences.

To see the currently configured server preferences:

plesk bin server_pref -s

--locales-list or -ll   Displays the list of supported locales.

To see the list of supported locales:

plesk bin server_pref -ll

--skins-list or -sl    

--load-customizations  

Loads default Plesk settings from Partner Central and saves them to /opt/psa/admin/conf/customizations.conf

When you have several Plesk servers, it may be convenient to customize Plesk setting once through Partner Central and then download the settings to each Plesk server.

To load customization settings from Partner Central:

plesk bin server_pref --load-customizations

--update-web-app-firewall   Updates setting for web application firewall (ModSecurity).

To turn on the web application firewall and select the OWASP ModSecurity Core Rule Set (CRS) rule set:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-rule-set crs

--show-web-app-firewall   Shows setting for web application firewall (ModSecurity).

To view the web application firewall settings:

plesk bin server_pref --show-web-app-firewall

--help or -h   Displays help on the use of the utility.

To display help on the use of the server_pref utility:

plesk bin server_pref --help

or

plesk bin server_pref -h

Options

Option Parameter Description Example
-locale <language_code>

Sets the default interface language for Plesk interface.

The argument of the option must be a valid four-letter language code derived from the language code described in ISO-639-2 and the corresponding country code described in ISO-3166.

For example, the Plesk code for the Italian language code is it-IT; the Plesk code for the American variant of English is en-US; the Plesk code for the British variant of English is en-GB.

Used with the --set-default only.

To set the default interface language for Plesk administrator’s interface to Russian:

plesk bin server_pref -sd -locale ru-RU

-skin <skin_name>

Sets the default interface skin for Plesk interface.

Used with the --set-default only.

To set the skin WinXP Olivegreen as the default skin:

plesk bin server_pref -sd -skin "WinXP Olivegreen"

-template <template_name>

Sets the default interface customization template to Plesk interface.

Used with the --set-default only.

To apply customization template Interface Customization Template to administrator’s control panel interface:

plesk bin server_pref -sd -template "Interface customization template"

-hostname <string> Sets the full host name of the server.

To set the host name to host.example.com:

plesk bin server_pref -u -hostname host.example.com

-restart-apache <number> Sets the apache restart interval.

To set the Apache restart interval to 3600 seconds:

plesk bin server_pref -u -restart-apache 3600

-include-logs true|false Enables/Disables including log files in the disk space usage calculation.

To enable including log files in the disk space usage calculation:

plesk bin server_pref -u -include-logs true

-include-databases true|false Enables/Disables including databases in the disk space usage calculation.

To enable including databases in the disk space usage calculation:

plesk bin server_pref -u -include-databases true

-include-remote-databases true|false Enables/Disables including remote MySQL databases in the disk space usage calculation.

To enable including remote MySQL databases in the disk space usage calculation:

plesk bin server_pref -u -include-remote-databases true

-include-mailboxes true|false Enables/Disables including mailboxes in the disk space usage calculation.

To enable including mailboxes in the disk space usage calculation:

plesk bin server_pref -u -include-mailboxes true

-include-maillists true|false Enables/Disables including mailing lists in the disk space usage calculation.

To enable including mailing lists in the disk space usage calculation:

plesk bin server_pref -u -include-maillists true

-include-domaindumps true|false Enables/Disables including domain backup files in the disk space usage calculation.

To enable including domain backup files in the disk space usage calculation:

plesk bin server_pref -u -include-domaindumps true

-include-admindumps true|false Enables/Disables including backup files created by the Administrator in the disk space usage calculation.

To enable including backup files created by the Administrator in the disk space usage calculation:

plesk bin server_pref -u -include-admindumps true

-count-type byte|block Counts file size (byte) or amount of disk space (block) when calculating disk space usage.

To enable counting disk space usage based on actual file sizes:

plesk bin server_pref -u -count-type byte

-stat-keep <months>

Limits the number of months to retain traffic statistics.

Is 4 by default.

To retain traffic statistics for 3 months:

plesk bin server_pref -u -stat-keep 3

-traffic-direction both|in|out

Specifies a type of calculating traffic. The following types are available:

  • inbound and outbound (both)
  • inbound (in)
  • outbound (out)

To include only outbound traffic in the traffic calculation:

plesk bin server_pref -u -traffic-direction out

-forbid-create-dns-subzone true|false

Disables/Enables users to create DNS subzones in other users’ DNS superzones.

Is false by default.

To prohibit users from creating DNS subzones in other user’s DNS superzones:

plesk bin server_pref -u -forbid-create-dns-subzone true

-include-webapps true|false Enables/Disables including Java applications in the disk space usage calculation.

To include Java applications in the disk space usage calculation:

plesk bin server_pref -u -include-webapps true

-force-db-prefix true|false

Enables/Disables adding database owner login name (customer or reseller) to database names as prefix <client|reseller>_login>_.

Is false by default.

To enable creating databases with names <client|reseller login>_<database name>:

plesk bin server_pref -u -force-db-prefix true

-low-priority true|false Enables/Disables running scheduled backup processes with low priority.

To enable running scheduled backup processes with low priority:

plesk bin server_pref -u -low-priority true

-compression-level no-compression|fastest|fast|normal|maximum

Sets the compression level for your backups and those created by customers and resellers.

You can specify the following compression levels: fastest, fast, normal, maximum, or no compression. The faster the compression level, the bigger the backup size and the lower CPU load is.

By default, Plesk uses fast compression.

To set the maximum compression level in the server backup settings (the smallest backup size, the slowest backup speed, the highest CPU load):

plesk bin server_pref --update -compression-level maximum

-max-backup-processes <int> Limits the maximum number of simultaneously running scheduled backup processes.

To restrict the maximum number of simultaneously running scheduled backup processes to 5:

plesk bin server_pref -u -max-backup-processes 5

-max-backup-files <int> Sets the maximum number of backup files to store.

To limit the number of backups users are allowed to have to 5:

plesk bin server_pref -u -max-backup-files 5

-force-db-user-prefix true|false

Enables/Disables adding database owner login name (customer or reseller) to database user names as prefix <<client|reseller>_login>_.

Is false by default.

To enable creating database users with names <customer|reseller login>_<database user name>:

plesk bin server_pref -u -force-db-user-prefix true

-db-user-length <int> Limits a database user name length.

To restrict a database user name length to 10:

plesk bin server_pref -u -db-user-length 10

-aps-catalog-url <url> Specifies URL of the APS Catalog service.

To make Plesk work with APS Catalog accessible by the URL http://apscatalog.com:

plesk bin server_pref -u -aps-catalog-url http://apscatalog.com

-disable-mail-ui true|false

Hides from Control Panel all controls related to managing e-mail services and adding new mail accounts.

This option does not actually switch off the Plesk-managed mail server, but only removes the following items from the Control Panel accessed by hosting service customers and their users:

  • Mail tab.
  • Home tab > Mail group.
  • Users tab > user name > Create an email address under your account option.

To hide from Control Panel all mail-related controls:

plesk bin server_pref -u -disable-mail-ui true

-crontab-secure-shell <shell>

Selects the shell that can be used on the server for running scheduled tasks with cron.

To learn more about this setting, refer to the Administrator Guide, (Plesk for Linux) Scheduled Tasks Shell Setting.

To allow execution of scripts in a non-chrooted environment and select the Bourne shell:

plesk bin server_pref -u -crontab-secure-shell "/bin/sh"

-preview-domain <domain name>|'' Sets the domain name for the site preview function. Your customers can preview their websites during domain name propagation. For this purpose, the Plesk DNS server registers customer websites as subdomains of the domain you specify. Do not specify a <preview_domain> if you do not want to use the site preview feature.

Sets the domain name example.com for the site preview function:

plesk bin server_pref -u -preview-domain example.com

-preview-protection true|false Turns on/off password protection for website preview. If turned on, a user will have to provide the system user credentials to preview a website created on the server.

To turn on the password protection for websites preview:

plesk bin server_pref -u -preview-protection true

-subdomain-dns-zone own|parent Allows subdomains to have their own DNS zones. Learn more in the Administrator’s Guide > DNS.

To turn on the support for the subdomain zones:

plesk bin server_pref -u -subdomain-dns-zone own

-autoupdates true|false If true, Plesk automatically downloads and installs updates.

To turn on automatic updates for Plesk:

plesk bin server_pref -u -autoupdates true

-autoupdates-email-notification <email address>

Sets an email address that will receive notifications about installed Plesk updates.

Requires the --update command.

To send email notifications about installed Plesk updates to mail@example.com:

plesk bin server_pref --update -autoupdates-email-notification mail@example.com

-autoupdates-third-party true|false Turns on/off automatic installation of updates for third-party Plesk components such as MySQL, PHPMyAdmin, mail servers, antivirus and other software.

To forbid automatic installation of updates for third-party components:

plesk bin server_pref -u -autoupdates-third-party false

-min_password_strength very_weak|weak|medium|strong|very_strong Sets the minimum password strength for all user passwords in Plesk. Users are forced to adjust their new passwords according to these requirements.

To set the “strong” level of the password strength for user passwords:

plesk bin server_pref -u -min_password_strength strong

-forbid-ftp-user-rename true|false Forbids customers to change the user name of the system user associated with their subscription.

To forbid all customers to change the system user name:

plesk bin server_pref -u -forbid-ftp-user-rename true

-forbid-subscription-rename true|false

Forbids customers and resellers to change the name of the main domain in their subscriptions. By default, the main domain name is the same as the subscription name.

Note that Plesk administrators can modify subscription names even if this option is true.

By default, for example, after Plesk upgrade or on new Plesk installations, this option is false.

To forbid customers and resellers to change the name of the main domain on their subscriptions:

plesk bin server_pref -u -forbid-subscription-rename true

-ssl-protocols <protocols> Sets up SSL/TLS protocols to all services.

To set the desired SSL/TLS protocols:

plesk bin server_pref -u -ssl-protocols 'TLSv1 TLSv1.1 TLSv1.2'

-ssl-ciphers <ciphers> Sets up SSL/TLS ciphers to all services.

To set the desired SSL/TLS ciphers:

plesk bin server_pref -u -ssl-ciphers 'HIGH:!aNULL:!MD5'

-disable-upgrade-extensions true|false Switches off automatic upgrade of Plesk extensions.

To switch off automatic upgrade of Plesk extensions:

plesk bin server_pref -u -disable-upgrade-extensions true

-apache-pipelog true|false Enables the Apache piped logging.

To enable the Apache piped logging:

plesk bin server_pref -u -apache-pipelog true

-ftp-over-ssl disabled|enabled|required

Sets up FTPS to protect communication between the FTP server and external FTP clients using SSL/TLS protocol.

To allow only secure FTPS connections, use required.

To allow both FTP and FTPS, use enabled.

To allow only secure FTPS connections:

plesk bin server_pref -u -ftp-over-ssl required

-support-url <url> Sets the URL that opens when clicking the Support button.

To set the URL opening at the press of the Support button to http://example.com:

plesk bin server_pref -u -support-url http://example.com

-aps-force-updates true|false

Turns on force automatic updates for all installed applications.

Users will be unable to turn off the updates.

To set force updates for all installed applications:

plesk bin server_pref -u -aps-force-updates true

-aps-suggest-updates true|false

Turns on automatic updates for all newly installed applications. If true, the option “Automatically update this app” will be turned on by default in the settings of each newly installed app.

Users will be able to turn the updates off unless the force updates are turned on by the Administrator.

To switch off automatic updates for newly installed applications:

plesk bin server_pref -u -aps-suggest-updates false

-allow-local-ftp-backup true|false

Allows or forbids the use of Plesk server as an FTP storage for Plesk backups.

If users configure backups for their Plesk accounts to go to their own FTP directories on the same Plesk server, the amount of used disk space will double upon creation of each backup. This can eventually run the server out of free disk space. To prevent this, we recommend that you use this option so as not to allow the use of Plesk server as an FTP storage for Plesk backups.

To prevent users from configuring Plesk so as to save backups to FTP directories on the same server:

plesk bin server_pref -u -allow-local-ftp-backup false

-panel-certificate <certificate name> Specifies the name of the SSL/TLS certificate used to secure Plesk.

To secure Plesk with the SSL/TLS certificate cert1:

plesk bin server_pref --update -panel-certificate "cert1"

-certificate-repository <domain-name>

Specifies the domain of the SSL/TLS certificate repository. By default, the server repository is used.

This option is used with the option -panel-certificate.

To secure Plesk with the SSL/TLS certificate cert3 that is stored at the repository of the domain example.net:

plesk bin server_pref --update -panel-certificate "cert3" -certificate-repository example.net

-waf-rule-engine on|off|detection-only

Specifies the web application firewall (ModSecurity) mode.

Used with the --update-web-app-firewall command.

To turn on the web application firewall and select the OWASP ModSecurity Core Rule Set (CRS) rule set:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-rule-set crs

-waf-rule-set tortix | crs | atomic | comodo | comodo_free | custom

Specifies the rule set used by the web application firewall (ModSecurity).

Used with the --update-web-app-firewall command.

Note: Before specifying the “Comodo (free)” rule set (defined by the comodo parameter), provide the Comodo username and password using the WAF_RULE_SET_COMODO_LOGIN and WAF_RULE_SET_COMODO_PASSWORD environment variables respectively.

Note:

Before specifying the “Atomic Advanced (bought from Atomicorp)” rule set (defined by the atomic parameter), provide the Atomic username and password using the WAF_RULE_SET_ATOMIC_LOGIN and WAF_RULE_SET_ATOMIC_PASSWORD environment variables respectively.

To turn on the web application firewall and select the “Comodo (free)” ModSecurity Core Rule Set (CRS) rule set:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-rule-set comodo_free

To turn on the web application firewall and select the “Atomic Standard (free, can be upgraded to Atomic Advanced)” ModSecurity rule set:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-rule-set tortix

-waf-archive-path <file> Specifies the path to the archive file that contains a custom rule set.

To turn on the web application firewall and select a custom rule set:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-rule-set custom -waf-archive-path /tmp/custom_rule_set.tar

-waf-rule-set-update-period none | daily | weekly| monthly Specifies how often ModSecurity rule sets are updated.

To turn on the web application firewall and update rule sets weekly:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-rule-set-update-period weekly

-waf-config-preset fast | tradeoff | thorough Specifies the predefined set of values used by ModSecurity.

To turn on the web application firewall and select the “Tradeoff” set of values:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-config-preset tradeoff

-waf-rule-filter-ids <id,id-id,...> Deactivates one or more security rules specified by their ID(s).

To deactivate the security rules with the IDs 340003, 340005, 340006, and 340007:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-rule-filter-ids 340003,340005-340007

-waf-filter-by-tags <tag_name>[,<tag_name>[,<tag_name>[,...]]] Deactivates one or more security rules specified by the tags associated with them.

To deactivate the security rules with the “anomaly-evaluation” and “attack-disclosure” tags:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-filter-by-tags anomaly-evaluation,attack-disclosure

-waf-filter-by-regexp <path to the file> Adds the contents of a file to the list of regular expressions in the ModSecurity configuration that are matched against rule messages. Rules matching at least one of the regular expressions are deactivated.

To add the contents of /tmp/regex to the list of regular expressions in the ModSecurity configuration:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-filter-by-regexp /tmp/regex

-waf-additional-settings <path to the file> Adds the contents of a file to the list of custom directives in the ModSecurity configuration.

To add the contents of /tmp/custom to the list of custom directives in the ModSecurity configuration:

plesk bin server_pref --update-web-app-firewall -waf-rule-engine on -waf-additional-settings /tmp/custom