> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-server/2025.2/setup-and-update/install-the-server/installing-sonarqube-from-zip-file.md).

# Installing from the ZIP file

{% hint style="info" %}
We recommend installing SonarQube Server from a [Docker image](https://hub.docker.com/_/sonarqube) or [Helm chart](https://artifacthub.io/packages/helm/sonarqube/sonarqube) (Kubernetes/OpenShift). These methods make it easier to update to newer versions and to operate your instance. Install from the ZIP file only if neither of those options is feasible for your environment.
{% endhint %}

First, check the [Installation requirements](/sonarqube-server/2025.2/setup-and-update/installation-requirements.md) and make sure the [correct Java version 17](https://adoptium.net/en-GB/temurin/releases/?version=17) or [Java version 21](https://adoptium.net/en-GB/temurin/releases/?version=21) is installed. Also, perform the [Pre-installation steps](/sonarqube-server/2025.2/setup-and-update/pre-installation.md). Then follow these steps:

## Download the distribution <a href="#download-zip" id="download-zip"></a>

Download and unzip the [distribution](https://www.sonarsource.com/products/sonarqube/downloads/), do not unzip into a directory starting with a digit.

`<sonarqubeHome>` (below) refers to the path of the directory where the SonarQube Server’s distribution has been unzipped.

## Perform various settings <a href="#various-settings" id="various-settings"></a>

### Set access to the database <a href="#set-access-to-the-database" id="set-access-to-the-database"></a>

Edit `<sonarqubeHome>/conf/sonar.properties` to configure the database settings. Templates are available for every supported database. Just uncomment and configure the template you need and comment out the lines dedicated to H2:

```css-79elbk
Example for PostgreSQL
sonar.jdbc.username=sonarqube
sonar.jdbc.password=mypassword
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube
```

### Add the JDBC driver <a href="#add-the-jdbc-driver" id="add-the-jdbc-driver"></a>

Drivers for the supported databases (except Oracle) are already provided. Do not replace the provided drivers; they are the only ones supported.

For Oracle, copy the JDBC driver into `<sonarqubeHome>/extensions/jdbc-driver/oracle`.

### Configure the Elasticsearch storage path <a href="#configure-the-elasticsearch-storage-path" id="configure-the-elasticsearch-storage-path"></a>

By default, Elasticsearch data is stored in `<sonarqubeHome>/data`, but this is not recommended for production instances. Instead, you should store this data elsewhere, ideally in a dedicated volume with fast I/O. In addition to maintaining performance, upgrading your instance of SonarQube Server will be easier.

Edit `<sonarqubeHome>/conf/sonar.properties` to configure the following settings:

<details>

<summary>Linux</summary>

```css-79elbk
sonar.path.data=/var/sonarqube/data
sonar.path.temp=/var/sonarqube/temp
```

</details>

<details>

<summary>Windows</summary>

```css-79elbk
sonar.path.data=H:\sonarqube\data
sonar.path.temp=H:\sonarqube\temp
```

</details>

The user launching SonarQube Server must have read and write access to those directories.

### Enabling IPv6 <a href="#enabling-ipv6" id="enabling-ipv6"></a>

<details>

<summary>Developer and Enterprise Editions</summary>

1. Enable IPv6 in the JVM by setting the `JAVA_TOOL_OPTIONS` environment variable to `-Djava.net.preferIPv6Addresses=true`.
2. Enable IPv6 in SonarQube Server by setting the `sonar.web.javaAdditionalOpts` property to `-Djava.net.preferIPv6Addresses=true` in the SonarQube Server configuration file (`<sonarQubeHome>/conf/sonar.properties`).

</details>

<details>

<summary>Data Center Edition</summary>

For each application node:

1. Enable IPv6 in the JVM by setting the `JAVA_TOOL_OPTIONS` environment variable to `-Djava.net.preferIPv6Addresses=true`.
2. Enable IPv6 in SonarQube Server by setting the `sonar.web.javaAdditionalOpts` property to `-Djava.net.preferIPv6Addresses=true` in the SonarQube Server configuration file (`<sonarQubeHome>/conf/sonar.properties`).

For each search node:

* Enable IPv6 in the JVM by setting the `JAVA_TOOL_OPTIONS` environment variable to `-Djava.net.preferIPv6Addresses=true`.

</details>

### Adjusting the Java executable path <a href="#adjusting-the-java-executable-path" id="adjusting-the-java-executable-path"></a>

By default, the scripts will use the Java executable available in the PATH. If multiple versions of Java are installed on your server, you may need to explicitly define which version is used.

It is possible to overwrite the default Java executable by setting the environmental variable `SONAR_JAVA_PATH`.

<details>

<summary>Linux</summary>

`export SONAR_JAVA_PATH="path/to/java_home/bin/java"`

</details>

<details>

<summary>Windows</summary>

`setx SONAR_JAVA_PATH "C:\Program Files\java_home\bin\java.exe"`

</details>

## Start the web server <a href="#start-server" id="start-server"></a>

1. Execute the following script to start the server:
   * On Linux: `<sonarqubeHome>/bin/linux-x86-64/sonar.sh start`
   * On macOS: `<sonarqubeHome>/bin/macosx-universal-64/sonar.sh start`
   * On Windows: `<sonarqubeHome>\bin\windows-x86-64\StartSonar.bat`
2. You can now open SonarQube Server at `http://localhost:9000` (the default system administrator credentials are **admin**/**admin**).
3. Once your server is installed and running, you’re ready to begin [Project analysis setup](/sonarqube-server/2025.2/analyzing-source-code/overview.md).

## Post-installation steps <a href="#post-installation" id="post-installation"></a>

You can encrypt sensitive properties stored in `<sonarqubeHome>/conf/sonar.properties`. See [Settings encryption](/sonarqube-server/2025.2/instance-administration/encrypting-settings.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sonarsource.com/sonarqube-server/2025.2/setup-and-update/install-the-server/installing-sonarqube-from-zip-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
