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

# Runlayer-Provided Inputs

> Credentials, release pins, and artifact access required before deploying Runlayer on ECS or Kubernetes

Before deploying on **ECS or Kubernetes**, contact your Runlayer account or support team for the inputs below. Receive secrets through an agreed secure channel and store them in your secret manager; never publish them in Git, tickets, or chat.

## Checklist

| Input | ECS + Terraform | Kubernetes |
| - | - | - |
| **Release versions** | Approved Terraform module version and compatible application version | Operator chart version, application version, and image tags |
| **Artifact access** | Private S3 module download; Customer Distribution ECR pulls | Customer Distribution ECR chart/image pulls, or an approved mirror |
| **WorkOS client ID** | `auth_client_id` | `runlayer-auth` Secret → `AUTH_CLIENT_ID` |
| **WorkOS API key** | `auth_api_key` | `runlayer-auth` Secret → `AUTH_API_KEY` |
| **MCP Catalog API key** | `mcp_catalog_api_key` | `runlayer-app` Secret → `MCP_CATALOG_API_KEY` |
| **Application hostname / authentication redirects** | Confirm with Runlayer for the chosen `domain_name` | Confirm with Runlayer for the instance's application hostname |
| **AI Watch download token and package entitlement**, when needed | `runlayer_download_token` | `runlayer-app` Secret → `RUNLAYER_DOWNLOAD_TOKEN` |
| **AI Watch snapshot delegation**, for AI Watch Local Proxy | `ai_watch_snapshot_delegations` | `spec.extraEnv` → `AI_WATCH_SNAPSHOT_DELEGATIONS` |
| **Distribution reader key and API URL** | Required by the [ECS deployment guide](https://docs.runlayer.com/deployment/terraform.md), which selects `openfeature_provider = "flagd"` | Required for deployment configuration, including feature flags and licensing; set `OPENFEATURE_PROVIDER=flagd`, `DISTRIBUTION_API_URL`, and `DISTRIBUTION_API_KEY` in the `runlayer-app` Secret |
| **Sentry Relay credentials**, when enabled | See [Sentry Relay credentials](https://docs.runlayer.com/deployment/sentry-relay-vault.md) | Same shared guide |

The catalog key is required for catalog and onboarding even where the configuration permits an empty default. Optional features may require additional credentials and cloud resources; select them before deployment.

For Distribution, obtain a reader key registered and active for this deployment. Runlayer must provision its configuration/target registration before the application can fetch configuration. For delegated registration and key rotation, see [Distribution configuration](https://docs.runlayer.com/deployment/ecs-features.md#distribution-configuration).

## Images and chart versions

Application images are published in Customer Distribution private ECR, account `088332244652`:

```text theme={null}
088332244652.dkr.ecr.<region>.amazonaws.com/runlayer/backend:<version>
088332244652.dkr.ecr.<region>.amazonaws.com/runlayer/frontend:<version>
088332244652.dkr.ecr.<region>.amazonaws.com/runlayer/worker:<version>
```

For ECS, pin a module release in `source`. Its default application version is listed in the [module changelog](https://docs.runlayer.com/deployment/terraform-changelog.md); set `app_version` only when choosing a compatible override. Module and application version numbers are separate.

For Kubernetes, also obtain the exact Operator chart version:

```text theme={null}
oci://088332244652.dkr.ecr.us-east-1.amazonaws.com/runlayer-helm-charts/runlayer-operator
```

GKE and other clusters without direct ECR access may use a registry mirror you operate. See the [Operator deployment guide](https://docs.runlayer.com/deployment/runlayer-operator.md).

## Authentication (WorkOS)

Use the client ID and API key issued for this installation. Coordinate the hostname, redirects, SSO, and initial administrator access with Runlayer before deploying.

* **ECS:** pass `auth_client_id` and the sensitive `auth_api_key` input. The module stores runtime credentials in AWS Secrets Manager.
* **Kubernetes:** create the `runlayer-auth` Secret after its namespace exists, then reference it through `spec.auth.clientIdFrom` and `spec.auth.apiKeyFrom`. Follow the [Secret creation order](https://docs.runlayer.com/deployment/runlayer-operator.md#install-order-for-secrets).

## MCP Catalog

The default catalog URL is `https://mcp-catalog.prod.runlayer.com`. Use a key issued for that environment. Without a key, catalog requests return `503` and the catalog/setup UI fails.

* **ECS:** pass `mcp_catalog_api_key`; leave `mcp_catalog_api_url` at its default unless Runlayer directs otherwise.
* **Kubernetes:** put `MCP_CATALOG_API_KEY` in `runlayer-app`, referenced by `spec.appSecretRef`. Set `MCP_CATALOG_API_URL` there only when directed. Do not enable the in-cluster `components.mcpCatalogApi` for the standard hosted-catalog path.

## AI Watch / binary packages

Request both `RUNLAYER_DOWNLOAD_TOKEN` and package entitlement. A token without entitlement cannot resolve an installer.

* **ECS:** configure [binary package distribution](https://docs.runlayer.com/deployment/ecs-features.md#binary-packages-and-downloads) and the download token before deployment.
* **Kubernetes:** supply the token in `runlayer-app`, provision the [cache bucket](https://docs.runlayer.com/deployment/external-dependencies.md#optional-ai-watch-binary-packages), and grant [workload identity access](https://docs.runlayer.com/deployment/workload-identity.md#ai-watch-binary-cache).

Allow `downloads.runlayer.com` from the relevant workloads. After configuration and rollout, run release discovery using **Check now** or the scheduled poll and verify package discovery.

## AI Watch snapshot delegation

> [!NOTE]
>
> Only needed for AI Watch Local Proxy. Leave both settings unset otherwise; the rest of AI Watch does not use them.

Devices running the local proxy accept only policy your deployment signs. Two values set that up:

* **Deployment key:** an Ed25519 key you generate. Your backend signs each device's policy with it. Its seed is a secret and never leaves your environment.
* **Delegation:** Runlayer's signature binding your deployment key to one organization for up to 90 days. Devices check it against Runlayer keys built into the local proxy. It is not a secret.

### Obtain a delegation

1. Generate the deployment key with the backend image you deploy:

   ```bash theme={null}
   docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/keys" \
     088332244652.dkr.ecr.<region>.amazonaws.com/runlayer/backend:<version> \
     /app/.venv/bin/python /app/scripts/ai_watch_snapshot_keys.py \
     gen-deployment-key --out /keys/deployment.json
   ```

   It prints `key_id` and `public_key`. `deployment.json` (mode `0600`) also holds the `seed`.
2. Store the `seed` as the signing key, then delete `deployment.json`:
   * **ECS:** the sensitive `ai_watch_snapshot_signing_key` input.
   * **Kubernetes:** `AI_WATCH_SNAPSHOT_SIGNING_KEY` in the `runlayer-app` Secret (with the Runlayer Terraform modules: `initial_tenant_secrets.ai_watch_snapshot_signing_key`).
3. Send Runlayer the `public_key` and the UUID of each organization this deployment serves (`organization_id` in `GET /api/v1/users/me`).
4. Runlayer returns JSON keyed by organization UUID. Set it unchanged; merge several files into one with `jq -cs add org-a.json org-b.json`.
   * **ECS:** the `ai_watch_snapshot_delegations` input. See [ECS optional features](https://docs.runlayer.com/deployment/ecs-features.md#ai-watch-snapshot-signing).
   * **Kubernetes:** the `ai_watch_snapshot_delegations` input of the Runlayer instance Terraform module, or `spec.extraEnv`:

     ```yaml theme={null}
     extraEnv:
       - name: AI_WATCH_SNAPSHOT_DELEGATIONS
         value: '{"<organization UUID>":{"payload":"…","signature":"…","root_key_id":"…"}}'
     ```

The backend reads both values only at start. Changing `spec.extraEnv` rolls the pods; after any other change, restart the backend tasks or pods.

### Renew

A delegation expires at its `not_after`, at most 90 days after Runlayer issues it. To list each organization's expiry:

```bash theme={null}
jq -r 'to_entries[] | "\(.key) \(.value.payload | @base64d | fromjson | .not_after)"' delegations.json
```

Ask Runlayer for a new delegation for the same `public_key` at least two weeks before `not_after`, and replace the value. A device's cached snapshot carries the delegation it was signed under, so it fails at the old expiry unless the device has fetched a new one since.

If a delegation lapses, the backend stops signing for that organization: `GET /api/v1/ai-watch/config/signed` returns `404` and logs `ai_watch_policy_snapshot_signing_misconfigured`. Devices reject every snapshot signed under it, including the one they cached.

### Rotate the deployment key

A delegation names one key, so a new key needs new delegations. Generate a new key, send Runlayer the new `public_key`, then set the new seed and delegations together and restart the backend. A mismatched key and delegation sign nothing (same `404` and log event).

If the seed leaks, rotate it and contact Runlayer support: devices trust the old key until its delegation's `not_after`. To stop signing for an organization, remove its entry from the delegations.

## Registry access

Runlayer grants access to the AWS account or pull principal during onboarding. Confirm both the operator/deployment identity and workload image-pull identity can access the required artifacts. ECS additionally needs S3 module download access from the machine running Terraform.

Contact [support@runlayer.com](mailto:support@runlayer.com) if downloads or pulls return `AccessDenied`.

## Secrets you generate or provision

**ECS:** the module generates `SECRET_KEY`, `MASTER_SALT`, and managed database/cache credentials. Supply credentials yourself when using external PostgreSQL or Redis. See [ECS secrets management](https://docs.runlayer.com/deployment/ecs-configuration.md#secrets-management).

**Kubernetes:** generate `SECRET_KEY` and `MASTER_SALT` locally (at least 32 characters in production), and supply database/cache credentials through the required Secrets. The operator does not create Secret data. Follow the [Operator Secret requirements](https://docs.runlayer.com/deployment/runlayer-operator.md#required-secrets-platform-namespace).

**AI Watch Local Proxy:** generate the snapshot deployment key yourself. See [AI Watch snapshot delegation](#ai-watch-snapshot-delegation).

## Security expectations

Store ECS inputs through your secret manager or `TF_VAR_*` environment variables. For Kubernetes, use your secret manager's synchronization mechanism or securely create Secrets after the namespace exists. Rotate credentials through Runlayer and your secret store, then restart the consuming tasks or pods.

Continue to [ECS prerequisites](https://docs.runlayer.com/deployment/ecs-prerequisites.md) or [Kubernetes prerequisites](https://docs.runlayer.com/deployment/kubernetes-prerequisites.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.