Running self-hosted Temporal with Docker Compose

Docker Compose can run Temporal well for development and small production setups when the database, visibility store and network exposure are chosen deliberately. This page explains where it fits and what it gives up compared with Kubernetes.

On this page

When Docker Compose is a sensible way to run self-hosted Temporal

Your team needs Temporal running on infrastructure you control, and you do not have a Kubernetes platform yet. For development and small production setups, Docker Compose is a reasonable choice, provided you accept the limits described below. Temporal Server is open source under the MIT license, so you can run it yourself, while Temporal Technologies also sells Temporal Cloud as a managed alternative if you would rather not operate the service.

The Temporal Server runs as a set of services (the frontend, history, matching and worker services) that together handle API calls, workflow state and task dispatch, and it depends on a persistence store for workflow data and a visibility store for search. The Temporal deployment documentation lists four ways to run it: Docker Compose, Go binaries, Helm charts that place each service in its own Kubernetes pod, and importing the server package into a custom Go build. This page covers Compose only. The other options are handled on their own pages, so use this one to decide whether Compose fits your environment before you commit to a platform.

Before you choose Compose, confirm three things with your own environment: that the hosts are reachable only from trusted internal networks, as the Temporal self-hosted deployment guide advises, that your team can own upgrades and backups without a cluster scheduler doing restarts for you, and that you have a named owner for the persistence database. If any of these are missing, plan for Temporal Cloud or a Kubernetes platform instead.

How the Compose services, persistence and visibility stores connect

The diagram starts with workers and clients calling the Temporal frontend, which sits inside a private network boundary. The frontend hands work to the internal history, matching and worker services, and those services read and write the persistence database. Visibility queries go to a separate visibility store, which is where Elasticsearch or OpenSearch is recommended once executions grow. The Web UI also sits behind the boundary, and the question to check is whether any of these services is reachable from outside the private network.

Conceptual layout of Compose services inside a private network, not a deployment file.

Where Compose fits: development, small production and larger estates

Compose is well suited to a developer's workstation or a shared test environment, where the goal is to run the Temporal Service next to workers and a database with one command and reset state when needed. Engineers can iterate on workflow code, replay and test behavior, and throw away data without affecting anyone else. The Temporal CLI dev server is also an option for this stage, and the choice depends on whether the team wants the multi-container layout that matches later environments.

  • Fast reset: Persistent volumes can be removed to start from an empty cluster, which suits repeated test runs.
  • Dependency parity: A local database and optional visibility store let developers hit the same query paths they will use later.
  • Permissive defaults: The default Authorizer allows every API request, so local setups should never hold real data or credentials.
  • SQLite caveat: SQLite is documented for development and testing only, so a Compose file that uses it should not be copied into production.
  • Version pinning: Pin the server image tag in the Compose file so every developer runs the same version.

Before sharing a development stack, confirm that it is reachable only from trusted networks, since the Temporal deployment documentation expects services not to be exposed to the public internet.

Choosing the persistence and visibility store for Compose

This table compares the persistence stores and visibility stores that self-hosted Temporal documents, with the versions named in the docs and when each suits a Compose deployment. Read the persistence and visibility columns as two separate decisions, since the visibility store only holds searchable workflow metadata. The main takeaway is that SQLite is for development only, and Elasticsearch or OpenSearch is the documented choice once workflow volume grows beyond a few executions.

StoreDocumented versionsWhen it fits ComposeWatch for
Persistence: PostgreSQLPostgreSQL 13 to 16Common default for a small production Compose stack with a managed or separately run databaseConfirm the exact version against the release notes for your Temporal Server minor line
Persistence: MySQLMySQL 5.7 and 8.0.19 or laterFits teams that already operate MySQL and want to reuse that operational skillCheck the 5.7 line is still supported for your chosen server version before choosing it
Persistence: CassandraCassandra 3.11, 4.0 and 5.0.4 or laterRarely a good fit for a Compose stack, since it adds a cluster with its own operations burdenUsually better suited to a Kubernetes or VM deployment with Cassandra expertise in-house
Persistence: SQLiteDevelopment and testing onlyLocal experiments and single-process tests on one machineNot for any environment that holds workflow data you need to keep
Visibility: ElasticsearchElasticsearch 7 and 8Recommended for anything beyond a few workflow executions, where search and listing must stay responsiveAdds a search cluster to size, secure and back up alongside the database
Visibility: OpenSearchOpenSearch 2 or later, from Temporal Server 1.30.1Alternative to Elasticsearch where your organization standardizes on OpenSearchConfirm the supported version pairing in the visibility docs before deploying
Visibility: PostgreSQL or MySQLPostgreSQL 12 or later, MySQL 8.0.17 or later, from Temporal Server 1.20Small deployments with light search needs that want fewer moving parts in ComposeSearch load grows with executions, so plan a move to a dedicated search store if volume rises
Visibility: CassandraRemoved in Temporal Server 1.24Not an option on current server versionsExisting Cassandra visibility data needs a documented migration path before upgrading

How to bring up a Compose stack for Temporal step by step

This sequence takes a team from an empty host to a running self-hosted Temporal Service with a database, visibility store, schema in place, and a verified client and Web UI connection. Each step ends with a check so a failure is caught before the next component depends on it.

  1. Confirm the server image version and compose files

    The platform engineer picks the Temporal Server release line the team will run and confirms the image tag and the Compose files for that release against the self-hosted deployment documentation, not against an older blog post or a copied snippet. Record the chosen tag in version control so every environment uses the same one. Confirm that the Web UI image and any database or visibility images in the file match the server release notes. The step is done when the pinned tags are written down and the compose file reviewed in a pull request.

  2. Start the database and visibility store

    The engineer starts the persistence database and the advanced visibility store as their own Compose services, with persistent volumes, credentials supplied through environment files or secrets, and no published ports beyond the host. Choose the persistence store from the documented options and use SQLite only for local development, since it is meant for development and testing. Confirm the visibility store choice against the visibility documentation, where Elasticsearch or OpenSearch is recommended for anything beyond a few workflow executions. The step is done when each service reports healthy and a direct connection from the host succeeds.

  3. Run schema setup before starting the server

    Before the Temporal services start, a one-off container runs the schema setup for the persistence store and, where required, the visibility index. Run it to completion and read its output for errors, because the server cannot start cleanly against a missing or partial schema. When release notes call for schema changes during an upgrade, the schema step runs before the server image changes, and the same order applies here. The step is done when the setup container exits successfully and the expected tables or indexes exist in the database.

  4. Start the Temporal Server services

    The engineer starts the Temporal Server services from the same compose file, pointing each one at the persistence and visibility settings the database step established. Keep the frontend reachable only on the trusted internal network, since the deployment documentation says Temporal services should not be reachable from the public internet. Review the logs for each service and confirm that they connected to the database and joined the cluster without repeated retries. The step is done when all services stay running after several minutes and the logs show no persistence or membership errors.

  5. Create a namespace and connect a client

    Using the Temporal CLI or a client SDK pointed at the frontend address, the engineer registers a namespace for testing and runs a minimal workflow and activity. This confirms that the frontend, history, matching and worker paths all function. Record the frontend address and namespace name so later steps and workers use the same values. The step is done when the test workflow completes and its history appears when queried from the client.

  6. Connect and check the Web UI

    The engineer starts the Web UI service, points it at the frontend address, and opens it from an approved workstation to confirm that the test workflow appears in the list view with the correct namespace and status. Note that the stack has no authorizer by default, so the Web UI and frontend are open to anyone who can reach them until access controls are configured. Confirm that the Web UI is not exposed beyond the internal network. The step is done when the test execution is visible in the UI and the network exposure has been checked from outside the intended network.

  7. Record the baseline and check after restart

    The team records the working versions, environment file layout, volume locations and the test namespace in its runbook, then restarts the whole stack once to confirm that data persists and services recover without manual steps. Confirm the same restart behavior after a host reboot if the host will be rebooted in production. Before moving on, check that the test workflow history still exists after the restart. The step is done when the runbook is updated and the stack returns to a healthy state after a full restart with the test history intact.

What you give up compared with Kubernetes

Docker Compose gives you a fast path to a working Temporal Service, but it hands operational duties to your own team that a Kubernetes platform usually handles for you. With Compose, restart and failover are manual or scripted: if the frontend, history, matching or worker service stops, nothing reschedules it unless you configure a restart policy and monitor the result. Scaling is also coarser. Compose can run more replicas of a service, but you decide placement, resource limits and the balance between services yourself, and you need to verify that each replica still reaches the persistence store and its peers.

Rolling upgrades, secrets and configuration are the other gaps. Temporal Server should be upgraded one minor version at a time, with schema upgrades run before server upgrades when the release notes call for them, and Compose has no built-in rollout or rollback sequencing for that. Database credentials, TLS material and the static and dynamic configuration files have to be distributed and rotated by hand or through your own tooling. Health-based recovery is limited to whatever healthchecks you define. The Helm chart runs the Temporal Server services in individual Kubernetes pods, which gives you probes, rollout controls and per-service scaling out of the box. Helm chart versions below 0.73.1 do not work with server images 1.30 and later, so confirm the chart version against the server image before you compare the two paths. Confirm also which operational tooling your team already runs (metrics, log shipping, alerting, backups) and whether it can monitor Compose containers as well as it monitors Kubernetes workloads.

Securing a Compose deployment before any workflow runs

A Compose stack can start and accept workflows with almost no security configured, so the controls below need to be decided before the first worker connects. Each card covers one documented default or setting, what it protects, and what your team should confirm in its own environment.

Authorizer default allows all requests

If no Authorizer is configured, self-hosted Temporal uses the default noopAuthorizer, which allows every API request with no authentication or access control. A Compose file copied from a development example can therefore expose full namespace access to anyone who reaches the frontend port. Confirm that an Authorizer and ClaimMapper are configured in the server settings before the stack leaves a test network.

Security docs

Keep services off the public internet

The Temporal deployment docs say services should run on hosts that are not reachable from the public internet, with network access restricted to trusted internal networks. In Compose, this means not publishing the frontend, internode and database ports on the host's public interface. Check the ports mappings and the host firewall, and confirm which workers and clients need to reach the frontend.

mTLS for internode and frontend traffic

Self-hosted Temporal supports mTLS with separate settings for internode traffic between services and for frontend traffic from clients and workers. Compose stacks often leave both in plaintext, so the certificate files must be mounted into each service container and the TLS settings verified separately for each path. Confirm certificate issuance, rotation ownership and the file paths each container reads.

ClaimMapper and Authorizer plugin

A ClaimMapper maps JWT or certificate claims to namespace roles, and an Authorizer plugin decides whether each request is allowed. Together they turn identity into per-namespace permissions, which the default setup does not provide. Because a custom Authorizer is a plugin, a Compose deployment of prebuilt images may need a custom image or a move to binaries. Confirm which roles your teams need and how claims are issued.

OIDC sign-in for the Web UI

The Web UI can use OIDC single sign-on, so operators sign in through your identity provider instead of sharing an open console. This matters because the Web UI can run operations on workflows, not only view them. Confirm the OIDC client settings, which operator groups can reach the UI, and whether read-only access is needed for some users.

Payload encryption through codecs

Self-hosted Temporal supports payload encryption through custom codecs and a codec server, so workflow inputs and results can be encrypted before they reach the Temporal service. Without a codec, payloads are stored and displayed in the form the SDK produces. Decide which data needs encryption, who holds the keys, and how the codec server is reached from the Web UI.

Questions teams ask before running Temporal on Compose

How much effort does a Docker Compose Temporal setup take?

Standing up a Compose stack for development is quick, but a production-grade stack takes considerably more work. The effort is driven by the persistence store you choose, whether you add advanced visibility, how you handle TLS and secrets, how many Temporal Service containers you run, and how much monitoring and backup you wire in. Each of these adds configuration, testing and documentation. Ask any partner for a quote built from a written scope that lists these components, and confirm which parts are one-time (design, initial build, hardening, documentation) and which recur (upgrades, patching, backup testing, on-call support).

What skills does the team need to run Temporal on Compose?

The team needs working knowledge of Docker, container networking, persistent volumes and a relational database, plus enough Temporal knowledge to size shards, configure namespaces and read server logs. Someone also has to own security settings, because the default Authorizer allows every API request until you configure one. Security engineers should review network exposure, since Temporal services are meant to run on hosts not reachable from the public internet. Plan for at least one person who can run upgrades and restore from backup, not just start the stack.

Can our own team run self-hosted Temporal with Compose?

Often yes, if the team already operates containers and a supported database and has time for the security and upgrade work. The deciding factors are whether someone can own the stack after go-live, whether they can test restores, and whether they can follow the upgrade procedure one minor version at a time. If those gaps exist, a fixed-scope engagement can cover design, build, hardening, documentation and handover, and retainers can cover upgrades and testing. DeployOpen can run this work inside your infrastructure, and the written scope should say who operates each part after handover.

When should we move from Compose to Kubernetes or Temporal Cloud?

Move from Compose to Kubernetes when you need to run the services as separate, independently scaled pods, need the orchestration controls your platform team already uses, or want Helm-based operations. Consider Temporal Cloud when you do not want to operate the Temporal Service, database and visibility store yourself, or when the managed availability and support tiers match your requirements. Temporal Cloud pricing starts at 50 US dollars per million actions, according to Temporal's pricing page, but your total cost depends on actions, storage and support tier, so ask for a quote based on your expected workload. Compose's main trade-off is less automated scaling, restarts and rollout tooling than Kubernetes provides.

Which database should we choose for a Compose deployment?

Choose PostgreSQL or MySQL for persistence in most small production setups, because Temporal tests persistence on PostgreSQL 13 to 16 and MySQL 5.7 and 8.0.19 or later. SQLite is intended only for development and testing. For advanced visibility, Temporal supports Elasticsearch 7 and 8, OpenSearch 2 or later from Temporal Server 1.30.1, and MySQL, PostgreSQL and SQLite from earlier versions, and recommends Elasticsearch or OpenSearch for anything beyond a few workflow executions. Cassandra visibility was removed in 1.24. Confirm your chosen versions against the persistence and visibility documentation before you pick a stack.

How are Temporal upgrades handled on a Compose stack?

Upgrades are handled as a planned procedure, not a image tag change. Temporal Server should be upgraded one minor version at a time, moving first to the latest patch of your current minor line, because backward compatibility is guaranteed only between two successive minor versions. Where release notes call for it, run schema upgrades before the server upgrade. Your procedure also needs a tested backup, a staging rehearsal and a rollback plan. Ask for the upgrade steps and the schema change log for each release in your written scope, and confirm who runs them after go-live.

What security controls must we set before the first Compose deployment?

Before any production traffic, configure an Authorizer, because self-hosted Temporal otherwise uses a default that allows every API request without authentication or access control. Then decide on mTLS for internode and frontend traffic, a ClaimMapper for mapping JWT or certificate claims to namespace roles, and OIDC sign-in for the Web UI. Restrict network access to trusted internal networks and plan payload encryption with a codec server where data is sensitive. Your security team should review these settings and record the evidence they will need for a compliance assessment.

How DeployOpen scopes and delivers a self-hosted Temporal deployment

DeployOpen plans and builds self-hosted Temporal inside infrastructure you control, starting from a written scope that states which Compose topology, database and visibility store are in use. The work is handed over with configuration, runbooks and tested recovery steps so your team can operate the Service after go-live.

How we scope

  • Confirm the target environment, whether a development, test or small production Compose host, and who will operate it afterward.
  • Record the chosen persistence store and visibility store, with the supported versions you will run, before any build starts.
  • Agree in writing the networks, TLS and authentication approach, and whether the Web UI and Temporal Proxy are in or out of scope.

How we build

  • Build the Compose file, environment settings and static configuration from the agreed design, with secrets kept out of the file itself.
  • Apply the documented schema setup for the chosen database and visibility store before the Temporal Server services start.
  • Test namespace creation, a sample workflow run, worker connectivity and visibility queries against the deployed stack.

How we hand over

  • Deliver the Compose files, configuration, network and port map, and a record of the versions and stores in use.
  • Provide runbooks for startup order, backup and restore of the database, and the upgrade sequence one minor version at a time.
  • Walk your operators through the deployment and confirm the checks they will run after each change.

How we support

  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer, which you can ask us to quote alongside the scope.
  • Ask any partner, including us, to confirm the supported version matrix and release notes for each upgrade step before it is applied.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.