Skip to main content
Temporal Server uses YAML configuration files to define persistence, networking, security, and operational settings. This guide covers all configuration options with real examples.

Configuration File Structure

A complete configuration file has these top-level sections:

Logging Configuration

Configure log output format and level:
boolean
default:"true"
Output logs to stdout instead of files
string
default:"info"
Minimum log level: debug, info, warn, error

Persistence Configuration

Basic Setup

integer
default:"4"
Number of history shards. Higher values improve scalability.Recommendations:
  • Development: 4
  • Small production: 128-512
  • Large production: 1024-4096
Cannot be changed after initial deployment

MySQL Configuration

PostgreSQL Configuration

Use postgres12_pgx for better performance with the pgx driver.

Cassandra Configuration

Cassandra is no longer supported for visibility stores. Use MySQL, PostgreSQL, or Elasticsearch.

Elasticsearch Configuration

For advanced visibility features:

Connection Pool Settings

integer
default:"20"
Maximum number of connections to the database
integer
default:"20"
Maximum number of idle connections to maintain
duration
default:"1h"
Maximum lifetime of a connection before it is closed
Tuning Guidelines:

Global Configuration

Membership Settings

duration
default:"30s"
Maximum time for a service to join the cluster ring
string
Address advertised to other cluster members. Leave empty for auto-detection.

Metrics Configuration

Access metrics at http://localhost:8000/metrics

Profiling Configuration

Access profiling data:
  • http://localhost:7936/debug/pprof/heap
  • http://localhost:7936/debug/pprof/profile
  • http://localhost:7936/debug/pprof/goroutine

TLS Configuration

Secures communication between Temporal services (Frontend, History, Matching, Worker)

Authorization Configuration

Service Configuration

Frontend Service

History Service

Matching Service

Worker Service

Internal Frontend Service

The internal-frontend service is optional and used for internal cross-cluster communication.

Cluster Metadata

Single Cluster

Multi-Cluster Setup

boolean
default:"false"
Enable global namespaces for multi-cluster replication
integer
default:"10"
Version increment between clusters. Use larger values (100+) for multi-cluster.

Archival Configuration

Archive completed workflow histories for long-term storage:

Dynamic Configuration

Dynamic configuration allows runtime changes without server restart. Example dynamic config file:
dynamicconfig/production.yaml

Environment Variable Templating

Configuration files support Go template syntax for environment variables:
Template functions:
  • env "VAR" - Get environment variable
  • default "value" (env "VAR") - Get with default
  • coalesce (env "VAR1") (env "VAR2") "default" - First non-empty value

Complete Example

config/production.yaml

Validation

Validate your configuration before deployment: