Self-host SonarQube Community with Levelrail

Verified

Continuous code quality and security analysis across 30+ languages, with quality gates for every pull request.

  • Memory3 GiB
  • Archarm64
  • Services2

How to self-host SonarQube Community

  1. Pull the images

    2 images are pulled on your server.

    Show images
    • postgres:16-alpine
    • sonarqube:community
  2. Create the app

    2 services start in a single Compose app, with 4 named volume mounts for your data, on port 9000.

  3. Fill in the secrets

    2 secrets are generated and stored encrypted, 4 settings are preset, you do not have to fill in anything.

  4. Open it

    Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.

SonarQube Community requirements

Memory
About 3 GiB
Architectures
amd64 image published, arm64 tested
Ports
9000
Domain
Optional, an sslip.io address is used without one
Settings
none to fill in
License
not yet recorded
  • Verified. Verified on arm64 with image tag 16-alpine. Our CI ran this exact image version and it answered on its health path. Evidence
  • Host ports. It publishes port 9000 on the host, so open them in the VPS firewall only if you want that.

Install Levelrail first

On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then SonarQube Community. New to Levelrail? Install it on a fresh VPS first.

docker pull ghcr.io/glincker/levelrail:latest

Then levelrail-cli login --device. See Getting started and the SonarQube Community docs page.

Deploy SonarQube Community your way

Every format below deploys the same pinned images. Pick the one that fits how you work.

Deploy SonarQube Community from the CLI

levelrail-cli templates deploy sonarqube --name my-sonarqube

Deploy SonarQube Community with the API

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/sonarqube/deploy

SonarQube Community configuration

SonarQube Community services

ServiceImagePortsVolumes
db postgres:16-alpine none sonarqube_db_data -> /var/lib/postgresql/data
sonarqube sonarqube:community 9000 sonarqube_data -> /opt/sonarqube/datasonarqube_extensions -> /opt/sonarqube/extensionssonarqube_logs -> /opt/sonarqube/logs

SonarQube Community environment variables

VariableServiceValue
POSTGRES_DB db Preset by the template
POSTGRES_PASSWORD db Generated at deploy
POSTGRES_USER db Preset by the template
SONAR_JDBC_PASSWORD sonarqube Generated at deploy
SONAR_JDBC_URL sonarqube Preset by the template
SONAR_JDBC_USERNAME sonarqube Preset by the template

Ports and volumes

Ports
9000
Volumes
4 named mounts: sonarqube_db_data -> /var/lib/postgresql/data, sonarqube_data -> /opt/sonarqube/data, sonarqube_extensions -> /opt/sonarqube/extensions, sonarqube_logs -> /opt/sonarqube/logs

SonarQube Community FAQ

How much memory does SonarQube Community need?

The catalog lists about 3 GiB of memory for SonarQube Community across its 2 services.

Does SonarQube Community run on arm64?

For SonarQube Community, arm64 is tested; amd64 is image published.

Does SonarQube Community need configuration before it starts?

No. The template fills in its own defaults and generates secrets at deploy time.

Which database does SonarQube Community bundle?

The template includes Postgres, running as its own service.

Which ports does SonarQube Community use?

SonarQube Community listens on port 9000 inside the stack.

Where does SonarQube Community keep its data?

In named volumes: sonarqube_db_data mounted at /var/lib/postgresql/data, sonarqube_data mounted at /opt/sonarqube/data, sonarqube_extensions mounted at /opt/sonarqube/extensions and sonarqube_logs mounted at /opt/sonarqube/logs.

Can I deploy SonarQube Community on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for SonarQube Community, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, sonarqube:community is what you deploy there.

levelrail-cli templates deploy sonarqube --name my-sonarqube