> 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.4/server-installation/from-docker-image/prepare-installation.md).

# Prepare the Docker installation

## Perform the pre-installation steps

See:

* [On Linux systems](/sonarqube-server/2025.4/server-installation/pre-installation/linux.md)
* [On Unix-based systems](/sonarqube-server/2025.4/server-installation/pre-installation/unix.md)
* [On macOS systems](/sonarqube-server/2025.4/server-installation/pre-installation/macos.md)
* [Defining a JWT token](/sonarqube-server/2025.4/server-installation/pre-installation/jwt-token.md) (to keep user sessions alive during startup)

## Create volumes to persist data <a href="#create-volumes" id="create-volumes"></a>

Creating the following volumes helps prevent the loss of information when updating to a new version or upgrading to a higher edition:

* `sonarqube_data`: contains data files, such as Elasticsearch indexes
* `sonarqube_logs`: contains SonarQube Server logs about access, web process, CE process, and Elasticsearch
* `sonarqube_extensions`: will contain any plugins you install and the Oracle JDBC driver if necessary.

Create the volumes with the following commands:

```bash
docker volume create --name sonarqube_data
docker volume create --name sonarqube_logs
docker volume create --name sonarqube_extensions
```

{% hint style="warning" %}
Make sure you’re using [**volumes**](https://docs.docker.com/storage/volumes/) as shown with the above commands, and not [**bind mounts**](https://docs.docker.com/storage/bind-mounts/). Using bind mounts prevents plugins from populating correctly.
{% endhint %}

## Oracle database: add the JDBC driver <a href="#add-jdbc-driver" id="add-jdbc-driver"></a>

Drivers for supported databases (except Oracle) are already provided. If you’re using an Oracle database, you need to add the JDBC driver to the `sonar_extensions` volume. To do this:

1. Start the SonarQube container with the embedded H2 database:

```bash
docker run --rm \
    -p 9000:9000 \
    -v sonarqube_extensions:/opt/sonarqube/extensions \
    <image_name>
```

For `<image_name>`, check the tags currently available on the [DockerHub page](https://hub.docker.com/_/sonarqube).

2. Exit once SonarQube Server has started properly.
3. Copy the Oracle JDBC driver into `sonarqube_extensions/jdbc-driver/oracle`.

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Installation overview](/sonarqube-server/2025.4/server-installation/from-docker-image/installation-overview.md)
* [Set up and start your container](/sonarqube-server/2025.4/server-installation/from-docker-image/set-up-and-start-container.md)
* [Advanced setup](/sonarqube-server/2025.4/server-installation/from-docker-image/advanced-setup.md)
* **Configuring network security features:**
  * [Reverse proxy and network security](/sonarqube-server/2025.4/server-installation/network-security/securing-behind-proxy.md)
  * [Network rules](/sonarqube-server/2025.4/server-installation/network-security/network-rules.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.4/server-installation/from-docker-image/prepare-installation.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.
