# Temporal

Source: https://docs.formance.com/v4.0/deploy/self-hosted/infrastructure/temporal

Stack: v4.0

Temporal is required when running the Payments or Flows modules — both ship a worker that registers workflows and activities against a Temporal namespace. If your stack uses neither today, you can skip it and add it later when you enable one of them.

The recommended way to spin up a Temporal deployment is through Temporal Cloud, or by using the official Temporal helm [chart](https://github.com/temporalio/helm-charts).

## Create the Temporal settings

In this example, you'll set up a configuration for the Orchestration module of the `formance-dev` stack. This configuration will apply to all the modules of this stack.

```yaml
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
  name: formance-dev-temporal-dsn
spec:
  key: temporal.dsn
  stacks:
    - 'formance-dev'
  value: temporal://dev-eu-west-1.fsdfsdf.tmprl.cloud:7233/dev-eu-west-1.fsdfsdf?
---
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
  name: formance-dev-temporal-tls-crt
spec:
  key: temporal.tls.crt
  stacks:
    - 'formance-dev'
  value: |
    -----BEGIN CERTIFICATE-----
    CERTIFICATE_CONTENT
    -----END CERTIFICATE-----

---
apiVersion: formance.com/v1beta1
kind: Settings
metadata:
  name: formance-dev-temporal-tls-key
spec:
  key: temporal.tls.key
  stacks:
    - 'formance-dev'
  value: |
    -----BEGIN PRIVATE KEY-----
    PRIVATE_KEY_CONTENT
    -----END PRIVATE KEY-----
```
