> 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/server-installation/data-center-edition/from-docker-image.md).

# From Docker image

Don't start this journey alone! As a DCE subscriber, Sonar will assist with the setup and configuration of your cluster. Get in touch with your account manager to receive appropriate onboarding resources.

## Overview <a href="#overview" id="overview"></a>

The Data Center Edition allows SonarQube to run in a clustered configuration to make it resilient to failures. When using Docker, the general setup principles remain the same but use Docker-specific terminology and configurations.

The default configuration for the Data Center Edition comprises:

* Three application nodes responsible for handling web requests from users (WebServer process) and handling analysis reports (ComputeEngine process)
* Three search nodes that host the Elasticsearch process
* A reverse proxy / load balancer
* A database server (PostgreSQL, Oracle, or Microsoft SQL Server)

## Important considerations <a href="#important-considerations" id="important-considerations"></a>

You should install SonarQube Server DCE on a single Docker host only for test purposes. Sonar recommends running the database, application, and search containers on different Docker hosts for production workloads.

## Requirements <a href="#requirements" id="requirements"></a>

### Network <a href="#network" id="network"></a>

All containers should be in the same network. This includes search and application nodes. For the best performance, check for low latency between the database and the cluster nodes.

### Container limits <a href="#container-limits" id="container-limits"></a>

The limits of each container depend on the workload that each container has. A good starting point is:

* `cpus: 0.5`
* `mem_limit: 4096M`
* `mem_reservation: 4096M`

The 4 GB `mem_limit` is the minimum value for Elasticsearch and shouldn't be lower.

### Scalability <a href="#scalability" id="scalability"></a>

Application nodes can be scaled using replicas. This isn't the case for the search nodes, as Elasticsearch won't become ready.

### Volumes <a href="#volumes" id="volumes"></a>

You'll use the following volumes in your configuration:

* `sonarqube_data` — volumes are shared between replicas in the application nodes, so you don't need a `sonarqube_data` volume on your application nodes. In the search nodes, the `sonarqube_data` volume contains the Elasticsearch data and helps reduce startup time, so Sonar recommends having a `sonarqube_data` volume on each search node. It should be mounted at `/opt/sonarqube/data`.
* `sonarqube_extensions` — for application nodes, Sonar recommends sharing a common `sonarqube_extensions` volume which contains any plugins you install and the Oracle JDBC driver if necessary. It should be mounted at `/opt/sonarqube/extensions`.
* `sonarqube_temp` — for application and search nodes, Sonar suggests using a `sonarqube_temp` volume (mounted at `/opt/sonarqube/temp`) that collects temporary files outputted by SonarQube. Sonar recommends having a `sonarqube_temp` volume on each search node.
* `sonarqube_logs` — for both application and search nodes, Sonar recommends sharing a common `sonarqube_logs` volume which contains SonarQube logs. It should be mounted at `/opt/sonarqube/logs`. The volume is populated with a new folder depending on the container's hostname and all logs of that container are put into that folder. This behavior also happens when a custom log path is specified via environment variables. Sonar recommends having a `sonarqube_logs` volume on each search node.

### Database server <a href="#database-server" id="database-server"></a>

Supported database systems are available on the [Installing database](/sonarqube-server/server-installation/installing-the-database.md) page.

### Load balancer <a href="#load-balancer" id="load-balancer"></a>

The installing organization must supply the load balancer. The general requirements are:

* Ability to balance HTTP requests (load) between the application nodes configured in the cluster
* If terminating HTTPS, meets the requirements set out in the operating documentation
* No requirement to preserve or sticky sessions; this is handled by the built-in JWT mechanism
* Ability to check for node health for routing

### License <a href="#license" id="license"></a>

You need a dedicated license to activate the Data Center Edition. If you don't have one yet, contact the Sonar Sales Team.

## Docker Compose configuration <a href="#docker-compose-configuration" id="docker-compose-configuration"></a>

If you're using [Docker Compose](https://docs.docker.com/compose/), use this [yml file example](https://github.com/SonarSource/docker-sonarqube/tree/master/example-compose-files/sq-dce-postgres) as a reference for evaluation purposes.

To use the 2026 LTA version of SonarQube, for example, change the following image tags in the [yml file example](https://github.com/SonarSource/docker-sonarqube/tree/master/example-compose-files/sq-dce-postgres):

* `sonarqube:datacenter-app` to `sonarqube:2026-lta-datacenter-app`
* `sonarqube:datacenter-search` to `sonarqube:2026-lta-datacenter-search`

### Key configuration elements <a href="#key-configuration-elements" id="key-configuration-elements"></a>

When configuring your Docker Compose file, ensure you include the following.

**For application nodes:**

* Use the appropriate Data Center Edition application image (for example, `sonarqube:datacenter-app` for the latest release)
* Mount the shared `sonarqube_extensions` and `sonarqube_logs` volumes
* Configure database connection via environment variables (`SONAR_JDBC_URL`, `SONAR_JDBC_USERNAME`, `SONAR_JDBC_PASSWORD`)
* Set cluster-related environment variables
* Configure the JWT secret for session management (`SONAR_AUTH_JWTBASE64HS256SECRET`)

**For search nodes:**

* Use the appropriate Data Center Edition search image (for example, `sonarqube:datacenter-search` for the latest release)
* Mount individual `sonarqube_data` volumes for each search node
* Mount the shared `sonarqube_logs` volume
* Configure cluster-related environment variables for Elasticsearch communication

### Installing using Docker Compose <a href="#installing-using-docker-compose" id="installing-using-docker-compose"></a>

1. In the folder where your `docker-compose.yml` is stored, run `docker-compose up -d`.
2. To check the health of all nodes, run `docker-compose ps`.
3. Verify the installation:
   * Access SonarQube through the load balancer.
   * Check that all nodes appear healthy on the **System Info** page.
   * Apply your Data Center Edition license.

## Environment variables <a href="#environment-variables" id="environment-variables"></a>

The following environment variables are commonly used in DCE Docker deployments.

### Database connection <a href="#database-connection" id="database-connection"></a>

* `SONAR_JDBC_URL` — JDBC URL for the database connection
* `SONAR_JDBC_USERNAME` — database username
* `SONAR_JDBC_PASSWORD` — database password

### Web server <a href="#web-server" id="web-server"></a>

* `SONAR_WEB_HOST` — web server host (default: `0.0.0.0`)
* `SONAR_WEB_PORT` — web server port (default: `9000`)
* `SONAR_WEB_CONTEXT` — web context path

### Cluster configuration <a href="#cluster-configuration" id="cluster-configuration"></a>

* `SONAR_CLUSTER_ENABLED` — enable cluster mode (`true`/`false`)
* `SONAR_CLUSTER_NODE_TYPE` — node type (`application` or `search`)
* `SONAR_CLUSTER_HOSTS` — comma-separated list of application node hosts
* `SONAR_CLUSTER_SEARCH_HOSTS` and `SONAR_CLUSTER_ES_HOSTS` — comma-separated list of search node hosts
* `SONAR_CLUSTER_NODE_NAME` — name of the search node
* `SONAR_CLUSTER_KUBERNETES` — set to `true` to enable application node autodiscovery
* `SONAR_AUTH_JWTBASE64HS256SECRET` — JWT secret for session management

## Limitations <a href="#limitations" id="limitations"></a>

* IPv6 isn't officially supported for the Docker images of the Data Center Edition.
* Search nodes can't be scaled using Docker replicas due to Elasticsearch requirements.
* Production deployments should use separate Docker hosts for database, application, and search containers.

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

* [DCE topology](/sonarqube-server/server-installation/data-center-edition/dce-topology.md)
* [Installation requirements](/sonarqube-server/server-installation/data-center-edition/installation-requirements.md)
* [Pre-installation steps](/sonarqube-server/server-installation/data-center-edition/pre-installation.md)
* [Installing from ZIP file](/sonarqube-server/server-installation/data-center-edition/from-zip-file.md)
* [Installing on Kubernetes or Openshift](/sonarqube-server/server-installation/data-center-edition/on-kubernetes-or-openshift.md)
* [Starting and stopping cluster](/sonarqube-server/server-installation/data-center-edition/starting-stopping-cluster.md)
* [Installing database](/sonarqube-server/server-installation/installing-the-database.md)
* **Configuring network security features:**
  * [Securing behind a proxy](/sonarqube-server/server-installation/data-center-edition/network-security/securing-behind-proxy.md)
  * [Elasticsearch security features](/sonarqube-server/server-installation/data-center-edition/network-security/elasticsearch-security-features.md)
  * [Network rules](/sonarqube-server/server-installation/data-center-edition/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/server-installation/data-center-edition/from-docker-image.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.
