Skip to main content
Version: 8.10 (unreleased)

Configure secondary storage with Docker Compose

Use this page to configure secondary storage for the Orchestration Cluster in the Docker Compose quickstart.

Configure secondary storage for the Orchestration Cluster

The lightweight docker-compose.yaml starts the Orchestration Cluster with Elasticsearch as secondary storage. To test another backend, add a docker-compose.override.yaml file next to the extracted Compose files and override the camunda service there.

The full docker-compose-full.yaml configuration already includes PostgreSQL for Management Identity and Web Modeler. That database is separate from the Orchestration Cluster secondary storage. If you want the Orchestration Cluster itself to use RDBMS, configure the camunda service as shown in the examples below.

Use this workflow for each example:

  1. Create docker-compose.override.yaml in the extracted distribution directory.
  2. Copy the backend-specific example into that file.
  3. If the backend requires an external JDBC driver, place the driver JAR directly in ./driver-lib and keep the ./driver-lib:/driver-lib volume mount from the example.
  4. Start the updated stack with the command shown below the example.
note

Camunda configures the built-in exporter automatically from camunda.data.secondary-storage.*. You do not need to add a separate exporter class for the standard Docker Compose quickstart.

note

Some existing pages still use the legacy environment variable prefix CAMUNDA_DATA_SECONDARYSTORAGE_*. The examples on this page use CAMUNDA_DATA_SECONDARY_STORAGE_* consistently.

Use RDBMS secondary storage

These examples switch the Orchestration Cluster from Elasticsearch to RDBMS. They are suitable for local development and evaluation. PostgreSQL and H2 are the simplest starting points. MariaDB and SQL Server are also bundled in the image. MySQL and Oracle require you to provide the JDBC driver.

note

The Orchestration Cluster supports RDBMS as secondary storage. Operate support on RDBMS is still limited in 8.9-alpha3. Before you use these examples beyond local development, review the RDBMS support policy.

services:
camunda:
environment:
CAMUNDA_DATA_SECONDARY_STORAGE_TYPE: rdbms
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_DATABASEVENDORID: postgresql
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_URL: jdbc:postgresql://postgres:5432/camunda_secondary
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_USERNAME: camunda
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_PASSWORD: camunda
depends_on:
- postgres

postgres:
image: postgres:16
environment:
POSTGRES_DB: camunda_secondary
POSTGRES_USER: camunda
POSTGRES_PASSWORD: camunda
ports:
- "5432:5432"
volumes:
- postgres-secondary-data:/var/lib/postgresql/data

volumes:
postgres-secondary-data:
docker compose up -d camunda postgres

Switch between RDBMS, Elasticsearch, and OpenSearch

To switch back from RDBMS to a document-store backend, change the CAMUNDA_DATA_SECONDARY_STORAGE_TYPE value and keep only the backend-specific connection settings you need.

services:
camunda:
environment:
CAMUNDA_DATA_SECONDARY_STORAGE_TYPE: elasticsearch
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_URL: http://elasticsearch:9200
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_USERNAME: ""
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_PASSWORD: ""
docker compose up -d camunda elasticsearch

This matches the default lightweight quickstart backend.

Secondary storage environment variables

Use these variables when you adapt the examples to your own local setup:

VariableUse
CAMUNDA_DATA_SECONDARY_STORAGE_TYPESelects the backend family: rdbms, elasticsearch, or opensearch.
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_URLJDBC connection string for the relational database used as secondary storage.
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_USERNAMEDatabase username for RDBMS secondary storage.
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_PASSWORDDatabase password for RDBMS secondary storage.
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_DATABASEVENDORIDOptional vendor override. Use postgresql, mariadb, mysql, oracle, mssql, or h2 when you want to make the backend explicit.
CAMUNDA_DATA_SECONDARY_STORAGE_RDBMS_AUTO_DDLControls whether Camunda creates and updates the schema automatically. The default is true.
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_URLEndpoint for Elasticsearch when type=elasticsearch.
CAMUNDA_DATA_SECONDARY_STORAGE_OPENSEARCH_URLEndpoint for OpenSearch when type=opensearch.

For additional secondary storage settings, see Configure secondary storage and Configure RDBMS for manual installations.

Next steps