> ## Documentation Index
> Fetch the complete documentation index at: https://ryvn.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Temporal

> Configure Temporal Cloud credentials for queue-based autoscaling

A Temporal connection stores an endpoint, namespace, and API key that installations can reference for [Temporal autoscaling](/docs/configure/scaling#temporal-queue).

## Configure the connection

<Steps>
  <Step title="Prepare Temporal Cloud access">
    In Temporal Cloud, find the namespace ID and endpoint for the namespace your workers use. Create an API key whose owner has access to that namespace. API keys inherit their owner's permissions; see [Temporal's permissions reference](https://github.com/temporalio/documentation/blob/main/docs/cloud/manage-access/permissions-reference.mdx).
  </Step>

  <Step title="Add the account in Ryvn">
    <Tabs>
      <Tab title="Dashboard">
        Open **Settings > Connections > Temporal** and click **Add Account**.

        | Field | Value |
        | - | - |
        | Name | A reusable name such as `temporal-production` |
        | Endpoint | The Temporal Cloud endpoint, including port, such as `your-namespace-id.tmprl.cloud:7233` |
        | Namespace | Your Temporal namespace ID |
        | API Key | An API key with access to that namespace |

        Click **Create Integration**.

        <Frame>
          <img src="https://mintcdn.com/ryvntechnologies/EqroOAhyYMhnwkDL/screenshots/temporal-create.jpg?fit=max&auto=format&n=EqroOAhyYMhnwkDL&q=85&s=c5afb1c2711afffa15825fd247e4093f" alt="Temporal account form with an example endpoint, namespace, and masked API key" width="608" height="480" data-path="screenshots/temporal-create.jpg" />
        </Frame>
      </Tab>

      <Tab title="CLI">
        [Authenticate the CLI](/docs/cli#authenticate) and set `TEMPORAL_API_KEY` in your shell to the API key from the previous step:

        ```bash theme={null}
        ryvn create connection temporal-production \
          --type temporal \
          --endpoint your-namespace-id.tmprl.cloud:7233 \
          --namespace your-namespace-id \
          --api-key "$TEMPORAL_API_KEY"

        ryvn describe connection temporal-production
        ```

        `describe` shows the stored configuration and whether an API key is configured. `ryvn test connection` supports secret providers, not Temporal; verify access through a consuming installation.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Reference it from an installation">
    Select the connection when configuring Temporal autoscaling and enter the worker task queue. In installation YAML, reference the connection by name:

    ```yaml theme={null}
    autoscaling:
      enabled: true
      minReplicas: 1
      maxReplicas: 10
      triggers:
        - temporal:
            connection: temporal-production
            taskQueue: worker-queue
            targetQueueSize: 10
    ```

    The trigger inherits the connection's endpoint, namespace, and API key. Explicit endpoint or namespace values on the trigger override the connection defaults.
  </Step>
</Steps>

## Rotate credentials

Use **Edit** on the account to replace its API key. Leave the key blank to keep the existing one. Verify autoscaling on a consuming installation before revoking the old key in Temporal Cloud.

The CLI does not currently provide a connection-update command; rotate the API key in the dashboard.

If autoscaling cannot reach Temporal, check the endpoint and port, namespace ID, API key permissions, and network access from the environment running the scaler. Also confirm the configured task queue matches the one used by your workers.

Before deleting an account, update installations whose autoscaling configuration references it.
