For the complete documentation index, see llms.txt.
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.

Choose a database configuration path

Camunda 8.10 uses different application configuration files for the lightweight and full Docker Compose setups.

SetupDefault secondary storageSelect another backend
Lightweight docker-compose.yamlFile-based H2Set ORCHESTRATION_CONFIG_FILE to a file from configuration/, then edit that file for your database connection.
Full docker-compose-full.yamlFile-based H2Replace the camunda.data.secondary-storage settings in .orchestration/application.yaml with the matching block from the file in configuration/, then edit the connection values.

The full setup also requires an external Elasticsearch instance for Optimize. The PostgreSQL containers in the full setup store Management Identity and Web Modeler data; they do not store Orchestration Cluster data.

warning

Do not replace .orchestration/application.yaml in the full setup with a file from configuration/. The files in configuration/ use the lightweight setup's Basic authentication settings. Replacing the full file removes its OpenID Connect (OIDC) and component configuration.

Use this workflow for each backend:

  1. Select the matching application file and database service from the table below.
  2. Configure the application file for your setup:
    • Lightweight setup: Edit the selected configuration/application-<database>.yaml file and set ORCHESTRATION_CONFIG_FILE to its filename.
    • Full setup: Replace the camunda.data.secondary-storage block in .orchestration/application.yaml with the block from the selected file, then edit the copied values there.
  3. Create docker-compose.override.yaml in the extracted distribution directory and copy the matching database service example into it.
  4. If the backend requires an external JDBC driver, place the driver JAR directly in driver-lib/.
  5. Start the setup with the command shown for that backend.
BackendApplication fileHostname from the overrideJDBC driver
H2application-h2.yamlNot applicableIncluded
PostgreSQLapplication-postgresql.yamlpostgres-secondaryIncluded
MariaDBapplication-mariadb.yamlmariadb-secondaryAdd the MariaDB Connector/J JAR to driver-lib/
MySQLapplication-mysql.yamlmysql-secondaryAdd the MySQL Connector/J JAR to driver-lib/
Oracleapplication-oracle.yamloracle-secondaryAdd the Oracle JDBC driver JAR to driver-lib/
Microsoft SQL Serverapplication-mssql.yamlmssql-secondaryAdd the Microsoft JDBC Driver JAR to driver-lib/

When the database runs from docker-compose.override.yaml, replace localhost in the selected JDBC URL with the hostname shown in the table. The MySQL file uses host port 3307 by default; container-to-container traffic uses MySQL port 3306 instead.

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.

Run with RDBMS secondary storage

The following examples run each supported RDBMS backend as a separate Docker Compose service. Use them for local development and evaluation. Review the RDBMS support policy before you plan another deployment type.

Set the JDBC URL in the application configuration to jdbc:postgresql://postgres-secondary:5432/camunda_secondary.

services:
orchestration:
depends_on:
- postgres-secondary
networks:
- secondary-storage

postgres-secondary:
image: postgres:16
environment:
POSTGRES_DB: camunda_secondary
POSTGRES_USER: camunda
POSTGRES_PASSWORD: camunda
volumes:
- postgres-secondary-data:/var/lib/postgresql/data
networks:
- secondary-storage

volumes:
postgres-secondary-data:

networks:
secondary-storage:
# Lightweight setup
ORCHESTRATION_CONFIG_FILE=application-postgresql.yaml docker compose -f docker-compose.yaml -f docker-compose.override.yaml up -d

# Full setup
docker compose -f docker-compose-full.yaml -f docker-compose.override.yaml up -d

Switch between RDBMS, Elasticsearch, and OpenSearch

For a document-store backend, add the backend settings to docker-compose.override.yaml. The environment variables override the secondary storage settings in either application configuration file.

note

These examples change the Orchestration Cluster secondary storage only. In the full setup, Optimize always requires Elasticsearch. The Elasticsearch example can serve both Orchestration and Optimize. If Orchestration uses OpenSearch, configure a separate Elasticsearch endpoint for Optimize in .env.

services:
orchestration:
environment:
CAMUNDA_DATA_SECONDARY_STORAGE_TYPE: elasticsearch
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_URL: http://elasticsearch-secondary:9200
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_USERNAME: ""
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_PASSWORD: ""
depends_on:
- elasticsearch-secondary
networks:
- secondary-storage

elasticsearch-secondary:
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.11
environment:
discovery.type: single-node
xpack.security.enabled: "false"
ES_JAVA_OPTS: -Xms512m -Xmx512m
ports:
- "9200:9200"
volumes:
- elasticsearch-secondary-data:/usr/share/elasticsearch/data
networks:
- secondary-storage

volumes:
elasticsearch-secondary-data:

networks:
secondary-storage:
# Lightweight setup
docker compose -f docker-compose.yaml -f docker-compose.override.yaml up -d

# Full setup
docker compose -f docker-compose-full.yaml -f docker-compose.override.yaml up -d

Document-store environment variables

Use these variables when you adapt the Elasticsearch and OpenSearch examples:

VariableUse
CAMUNDA_DATA_SECONDARY_STORAGE_TYPESelects elasticsearch or opensearch.
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_URLEndpoint for Elasticsearch.
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_USERNAMEUsername for Elasticsearch when authentication is enabled.
CAMUNDA_DATA_SECONDARY_STORAGE_ELASTICSEARCH_PASSWORDPassword for Elasticsearch when authentication is enabled.
CAMUNDA_DATA_SECONDARY_STORAGE_OPENSEARCH_URLEndpoint for OpenSearch.

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

Next steps