System properties common to all SonarQube editions
SonarQube utilizes system properties during startup, which are not stored in the database. This page lists the configurable system properties common to all SonarQube Server editions (if not otherwise indicated). Properties specific to the Data Center Edition are listed on this page.
General
Properties
System property :
| Description |
---|---|
| Enables the Multi-Quality Rule (MQR) Mode1) in your instance. Possible values: |
| Path to the directory used by SonarQube to store persistent data file. The path can be absolute or relative to the SonarQube home directory2). |
| Path to the directory used by SonarQube to store temporary files. The path can be absolute or relative to the SonarQube home directory2). |
| Delay in seconds between processing of notification queue. Default value: |
| Enables Telemetry3). By sharing anonymous SonarQube statistics, you help us understand how SonarQube is used so we can improve the product to work even better for you. We don't collect source code or IP addresses. And we don't share the data with anyone else. Default value: |
1) See Multi-Quality Rule (MQR) Mode.
2) The SonarQube home directory is: the location where the SonarQbue distribution has been unzipped (for a ZIP installation); the installation directory of SonarQube within your container (for a Docker installation).
3) See Telemetry.
4) See Encrypting sensitive system properties.
Database
General
System property :
| Description |
---|---|
| JDBC user name. |
| JDBC user password. |
| Database connection string. Oracle:
PostgreSQL:
Microsoft SQL Server:
|
| H2 embedded database server listening port. Default value: 9092 |
Connection pool
System property :
| Description |
---|---|
| The maximum number of active connections that can be allocated at the same time, or negative for no limit. The recommended value is 1.2 * max sizes of HTTP pools. For example, if HTTP ports are enabled with default sizes (50, see property Default value: 60 |
| The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit. Default value: 5 |
| The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none. Default value: 2 |
| The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or <= 0 to wait indefinitely. Default value: 5000 |
Web server
JVM options
System property :
| Description |
---|---|
| Is used to customize JVM options for the Web server process by overriding all the existing options. |
| Is used to customize JVM options for the Web server process by adding them to the existing options. Note: If this variable is used with SONAR_WEB_JAVAOPTS, its content is appended to SONAR_WEB_JAVAOPTS. |
Web server connection
System property :
| Description |
---|---|
| For servers with more than one IP address, this property specifies which address will be used for listening on the specified ports. Default value: |
| TCP port for incoming HTTP connections. Default value: |
| Web context specifying the path at which to serve SonarQube. For example, with Example: Default value: empty (root context) |
HTTP connections
System property :
| Description |
---|---|
| The maximum number of connections that the server will accept and process at any given time. When this number has been reached, the server will not accept any more connections until the number of connections falls below this value. The operating system may still accept connections based on the Default value: 50 |
| The minimum number of threads always kept running. Default value: 5 |
| The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. Default value: 25 |
| The number of milliseconds this Connector will wait for another HTTP request before closing the connection. Use a value of -1 to indicate no (i.e. infinite) timeout. Default value: 60000 (ms) |
User sessions
System property :
| Description |
---|---|
| By default, users are logged out and sessions closed when server is restarted. If you prefer keeping user sessions open, a secret should be defined. Value is HS256 key encoded with base641). It must be unique for each installation of SonarQube. |
| Inactive session timeout (in minutes). The maximum time a user can remain idle (no activity) before the session ends. If the user does not interact with the system within this time, they are logged out. Default value: Minimum value: Maximum value: |
| This property is supported starting in SonarQube Server's Enterprise Edition. Active session timeout (in minutes). The maximum time a user can remain logged in, regardless of activity. After this time, the session ends automatically even if the user is actively using the system. Default value: Minimum value: Maximum value: |
1) See Generating a JWT token.
Authentication to web services
System property :
| Description |
---|---|
sonar.web.systemPassCode SONAR_WEB_SYSTEMPASSCODE | A passcode can be defined to access some web services from monitoring tools without having to use the credentials of a system administrator. Check the Web API documentation to know which web services are supporting this authentication mode. The passcode should be provided in HTTP requests with the header "X-Sonar-Passcode"1). By default, feature is disabled. |
1) See Authenticating to the Web API in Web API.
SSO authentication
Properties
System property :
| Description |
---|---|
| Enable authentication using HTTP headers. Default value: |
| The name of the header to get the user login. Only alphanumeric, '.' and '@' characters are allowed. Default value: |
| The name of the header to get the user name. Default value: X-Forwarded-Name |
| The name of the header to get the user email (optional) Default value: |
| The name of the header to get the list of user groups, separated by comma (optional). If this property is set, the user will belong to those groups if groups exist in SonarQube. If none of the provided groups exists in SonarQube, the user will only belong to the default group. Note that the default group will always be set. Default value: |
| The interval used to know when to refresh name, email, and groups. During this interval, if for instance the name of the user is changed in the header, it will only be updated after X minutes. Default value: |
LDAP authentication
See also Setting up LDAP authentication.
General
System property:
| Description | Required |
---|---|---|
| Enables the LDAP feature. If set to Possible value: | Yes |
| Is intended to be set to Default value: | No |
| URL of the LDAP server. If you are using ldaps, you should install the server certificate into the Java truststore. Example: | Yes |
| The username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory. Example: | No |
| The password of the user to connect with. Leave this blank for anonymous access to the LDAP directory. Example: | No |
| Possible values: Possible values: | No |
| See Digest-MD5 Authentication, CRAM-MD5 Authentication Example: | No |
| Context factory class. Default value: | No |
| Enables the use of Default value: | No |
| Follow referrals or not. See Referrals in the JNDI Default value: | |
| Quality of protection request. Example: | No |
| Cryptographic protection request. Example: | No |
| Maximum receive buffer size. | No |
User mapping
System property:
| Description | Required |
---|---|---|
| Distinguished Name (DN) of the root node in LDAP from which to search for users. Example for Active Directory: | Yes |
| LDAP user request. Default value: Example for Active Directory: | No |
| Attribute in LDAP defining the user’s real name. Default value: | No |
| Attribute in LDAP defining the user’s email. Default value: | No |
Group synchronization
System property:
| Description | Required |
---|---|---|
| Distinguished Name (DN) of the root node in LDAP from which to search for groups. Example for Active Directory: | No |
| LDAP group request. Default value: Example for Active Directory: | No |
| Property used to specifiy the attribute to be used for returning the list of user groups in the compatibility mode. Default value: | No |
Compute engine
Properties
System property :
| Description |
---|---|
| Is used to customize JVM options for the Compute Engine process by overriding all the existing options. |
| Is used to customize JVM options for the Compute Engine process by adding them to the existing options. Note: If this variable is used with SONAR_CE_JAVAOPTS, its content is appended to SONAR_CE_JAVAOPTS. |
Elasticsearch
Properties
System property :
| Description |
---|---|
| Is used to customize JVM options for the Elasticsearch process by overriding all the existing options. |
| Is used to customize JVM options for the Elasticsearch process by adding them to the existing options. Note: If this variable is used with SONAR_SEARCH_JAVAOPTS, its content is appended to SONAR_SEARCH_JAVAOPTS. |
| Elasticsearch port. Use 0 to get a free port. As a security precaution, should be blocked by a firewall and not exposed to the Internet. Default value: 9001 |
| Elasticsearch host. The search server will bind this address and the search client will connect to it. Default is loopback address. As a security precaution, should NOT be set to a publicly available address. |
Marketplace (proxy configuration)
If your SonarQube is located behind a proxy, you must configure the proxy parameters listed below to make sure SonarQube Marketplace can connect to the Update Center.
Properties
System property :
| Description |
---|---|
| Specifies whether the SonarQube's Marketplace automatically searches for plugin updates. Default value: |
| HTTP proxy host. |
| HTTP proxy port number. |
| HTTPS proxy host. Default value: sonar.http.proxyhost or HTTP_PROXYHOST value, respectively. |
| HTTPS proxy port number. Default value: sonar.http.proxyport or HTTP_PROXYPORT value, respectively. |
| NT domain name if NTLM proxy is used. |
| SOCKS proxy port number. |
| SOCKS proxy host. |
| Proxy authentication (used for HTTP, HTTPS and SOCKS proxies). |
| List of hosts that can be accessed without going through the proxy. The list items are separated by the '|' character. The wildcard character '*' can be used for pattern matching used for HTTP and HTTPS. Note: Localhost and its literal notations (e.g. |
Logging
Properties
See also Setting up the server-side logging.
System property :
| Description |
---|---|
| Global level of logs (applies to all 4 processes). Possible values: |
where <process> can be:
| Level of logs for each process. When specified, they overwrite the level defined at the global level. Possible values: |
| Path to log files. Can be absolute or relative to the SonarQube home directory1). Default value: |
| Rolling policy of log files (including the access log). Possible values:
Default value: |
| Maximum number of files to keep if a rolling policy is enabled. The maximum value is:
Set to zero to disable old file purging. |
| Converts the log output to JSON. Possible values: |
| Specifies whether the access log is enabled, i.e. whether HTTP requests received by the server are logged. If enabled, the list of requests is stored in the access.log file. |
| If the access log is enabled, format of the access log. Possible values:
Default value: Notes:
|
1) The SonarQube home directory is: the location where the SonarQbue distribution has been unzipped (for a ZIP installation); the installation directory of SonarQube within your container (for a Docker installation).
AI features
Properties
System property :
| Description |
---|---|
| Disables the AI CodeFix feature1) completely in SonarQube Server and hides the feature from all users, including System Adminstrators. Default value: |
1) See AI CodeFix.
Related pages
Was this page helpful?