> 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-community-build/server-installation/on-kubernetes-or-openshift/installing-helm-chart.md).

# Installing Helm chart

How to install the Helm chart for SonarQube Community Build.

Once you have customized the Helm chart, you can install it. You can also overwrite Helm chart parameters directly in the installation command, see [#openshift-test](#openshift-test "mention").

## General installation command <a href="#general-command" id="general-command"></a>

Use the following command to install the latest SonarQube Community Build Helm chart.

```sh
helm repo add sonarqube https://SonarSource.github.io/helm-chart-sonarqube
helm repo update
kubectl create namespace sonarqube
export MONITORING_PASSCODE="yourPasscode"
helm upgrade --install -n sonarqube sonarqube sonarqube/sonarqube --set community.enabled=true,monitoringPasscode=$MONITORING_PASSCODE
```

{% hint style="info" %}

* To specify the version to be installed, use the `community.buildNumber` parameter. By default, the latest version is installed.
* The parameters after `--set` can also be defined in the Helm chart.
* The monitoring Passcode is required for the helm upgrade operation. See [Setting up monitoring](/sonarqube-community-build/server-installation/on-kubernetes-or-openshift/set-up-monitoring.md) for a better way to store the monitoring passcode used to authenticate to the Web API.
  {% endhint %}

## Example: installing on OpenShift <a href="#openshift-test" id="openshift-test"></a>

```sh
helm repo add sonarqube https://SonarSource.github.io/helm-chart-sonarqube
helm repo update
kubectl create namespace sonarqube
export MONITORING_PASSCODE="yourPasscode"
export JDBC_URL="jdbc:postgresql://myPostgres/myDatabase"
export JDBC_USERNAME="jdbc-username"
export JDBC_PASSWORD_SECRET_NAME="jdbc-secret"
export JDBC_PASSWORD_SECRET_KEY="jdbc-password"
helm upgrade --install -n sonarqube sonarqube sonarqube/sonarqube \
 --set OpenShift.enabled=true \
 --set community.enabled=true \
 --set monitoringPasscode=$MONITORING_PASSCODE \
 --set jdbcOverwrite.jdbcUrl=$JDBC_URL \
 --set jdbcOverwrite.jdbcUsername=$JDBC_USERNAME \
 --set jdbcOverwrite.jdbcSecretName=$JDBC_PASSWORD_SECRET_NAME \
 --set jdbcOverwrite.jdbcSecretPasswordKey=$JDBC_PASSWORD_SECRET_KEY
```

## Setting up an external database for testing

The chart requires an external database. If you want to perform a quick test, install [a PostgreSQL chart](https://artifacthub.io/packages/helm/bitnami/postgresql) on your cluster. See this [setup example](https://github.com/SonarSource/helm-chart-sonarqube/blob/master/.github/scripts/setup_external_postgres.sh) for guidance. For more information and settings, refer to the [chart documentation](https://artifacthub.io/packages/helm/sonarqube/sonarqube).

After installing the database, set the following values accordingly: `jdbcOverwrite.jdbcUrl`, `jdbcOverwrite.jdbcUsername`, `jdbcOverwrite.jdbcSecretName`, and `jdbcOverwrite.jdbcSecretPasswordKey`.

## Related pages

* [Customizing Helm chart](/sonarqube-community-build/server-installation/on-kubernetes-or-openshift/customizing-helm-chart.md)
* [Setting up monitoring](/sonarqube-community-build/server-installation/on-kubernetes-or-openshift/set-up-monitoring.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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-community-build/server-installation/on-kubernetes-or-openshift/installing-helm-chart.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
