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

# Move a self-hosted instance to SECRET_KEY alone

> Find out which dedicated secret variables your instance still sets, switch to SECRET_KEY in a maintenance window, and re-encrypt stored data under the new key from System Admin. Lists how long each old value has to stay.

> [!TIP]
>
> The admin page used here is available for self-hosted Business plan and above

`SECRET_KEY` can supply every server secret Teable needs. JWTs, sessions and the various encryption keys use it directly, or a key derived from it, whenever they have no variable of their own. The app needs two secrets of its own:

* `SECRET_KEY`: the root secret.
* `SANDBOX_JWT_SECRET`: signs the sandbox's execution tokens. The sandbox runs your users' scripts and never holds the root secret, so this one does not follow `SECRET_KEY`.

Setting the other dedicated variables (`BACKEND_JWT_SECRET`, `BACKEND_SESSION_SECRET`, the `*_ENCRYPTION_*` ones and so on) is no longer recommended, and a later version may stop reading most of them. This page shows how to move an existing instance to these two secrets without losing the data it already holds.

One optional variable is the exception: `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET` gives the credentials encrypted in the database a root of their own. See [A separate root for stored credentials](#stored-credential-root).

A new deployment needs none of this: generate the two secrets as described under [Environment Variables](https://help.teable.ai/en/deploy/env.md#secrets-and-rotation) and leave the rest unset.

> [!WARNING]
>
> A later version will refuse to start while `SECRET_KEY` is unset or still its public default. If your instance runs that way, [switch to your own SECRET\_KEY](#own-secret-key) before upgrading to that version.

> [!WARNING]
>
> Later versions will also remove some of the other dedicated variables, together with the code that reads them. No date is set. If you plan to upgrade, do it soon and finish this guide on a version that still reads them: an instance that jumps straight to a version without them can no longer read what was stored under them.

## Before you start

* **Upgrade first.** Bring the instance to the latest version before you begin, at least `release.2026-11-26T23-38-15Z.4093`, the first release with everything this guide uses. The steps use the **Key rotation** page in System Admin; if System Admin does not show it, the version is too old or the plan is below Business.
* **Back up.** Back up the database and every environment variable. After a re-encryption, the data only opens with the current key.
* **Plan a maintenance window.** The instance restarts along the way, and users sign in again when the session secret changes.
* **Change every replica together.** All replicas and workers must restart on the same new configuration before you re-encrypt. A replica still on the old configuration cannot read the rewritten data.

## Step 1: check what is set

While an instance still runs on the public built-in defaults, the startup log lists the missing secrets, and instance admins see a **Server secrets** item under **System Admin → Instance settings**, in the **Pending configuration** panel. The startup log also prints a block of variables that pins the current values. This guide does not need it; on an instance that already added the block, those variables appear on the page as dedicated variables marked **Public value**.

For the full picture, open **System Admin → Key rotation → Server secrets** as an instance admin. It lists `SECRET_KEY`, `SANDBOX_JWT_SECRET`, and each secret that still has its own variable or an `_OLD` variable set. A secret that is not listed follows `SECRET_KEY` and needs nothing. [Key rotation](https://help.teable.ai/en/basic/admin-panel/key-rotation.md#server-secrets) explains the columns.

Use what the page shows to tell which cases apply; there can be more than one:

| The page shows | What it means | Next |
| - | - | - |
| Only the `SECRET_KEY` and `SANDBOX_JWT_SECRET` rows, neither marked **Public value** | Already the target state | Nothing to do |
| `SECRET_KEY` without **Public value**, plus dedicated variables | The root secret is fine; dedicated variables are left | [Remove the dedicated variables](#remove-dedicated-variables) |
| `SECRET_KEY` shown as not set, or marked **Public value** | The instance runs on public built-in defaults | [Switch to your own SECRET\_KEY](#own-secret-key) |
| `SANDBOX_JWT_SECRET` marked **Public value** | The sandbox secret is still the public default | Generate a value with `openssl rand -base64 32`, set it for the app and, if you run a sandbox service, for that service too, then restart. No stored data depends on it |
| Rows that are listed only for their `_OLD` variables | Old values are still being kept | Remove each one when [the table below](#old-value-retention) allows |

> [!WARNING]
>
> A value copied from documentation or an example file is as public as a built-in default, but the page cannot tell. The template on the [Docker deployment](https://help.teable.ai/en/deploy/docker.md) page contains `SECRET_KEY=replace_this_secret_key`: if the instance still runs on that value, treat `SECRET_KEY` as public and follow [Switch to your own SECRET\_KEY](#own-secret-key).

## Remove the dedicated variables

For each row whose **Value from** reads **Own variable**, other than `SECRET_KEY` and `SANDBOX_JWT_SECRET` themselves, look at the last column, **Same as SECRET\_KEY alone**:

* **Same**: delete the variable. The value does not change and no data is affected.
* **Different**: move its current value to the variable of the same name with `_OLD` appended (for example `BACKEND_AI_CONFIG_ENCRYPTION_SECRET_OLD`), then delete the variable itself. `_OLD` only verifies or decrypts existing data; everything new uses `SECRET_KEY`. For a key and iv pair, set both `_OLD` variables together. A variable that [the table below](#old-value-retention) does not list has no `_OLD`: delete it as it is, unless the page labels it **Deprecated** (see the note under the table).

Each `_OLD` variable holds one previous value only. If the environment already has `_OLD` variables, for example from an earlier change, finish the re-encryption and remove them before you start another round. Otherwise data still encrypted under the older value becomes unreadable and has to be entered again.

You can handle every variable in one change:

1. Stop the instance, edit the environment variables as described above, then start every replica.
2. Open the [Stored ciphertexts](https://help.teable.ai/en/basic/admin-panel/key-rotation.md#stored-ciphertexts) tab and click **Dry-run**. The **Undecryptable** column should be 0 everywhere. If it is not, an `_OLD` value is missing: add it before you continue.
3. Click **Re-encrypt**, then run the dry-run once more. When **Needs re-encryption** and **Undecryptable** are both 0, all stored ciphertext is under `SECRET_KEY`.
4. If the JWT signing secret changed and the instance has App Builder apps, open [JWT credentials](https://help.teable.ai/en/basic/admin-panel/jwt-credentials.md) and refresh the credentials of every app under **Needs attention**.
5. Spot-check sign-in, a personal access token call, AI features, third-party credentials in automations, and published apps.
6. Remove each `_OLD` variable when the table below allows, restarting after each removal.

### How long each old value stays

| Variable | What `_OLD` does | When you can remove `_OLD` | Switching without `_OLD` |
| - | - | - | - |
| `BACKEND_ENV_VARIABLE_SECRET`, `BACKEND_AI_CONFIG_ENCRYPTION_SECRET`, `BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET` | Decrypts the app environment variables, AI provider keys and third-party credentials stored under the old value | After the re-encryption, once both dry-run columns are 0. For the third-party credential secret, see the note on automations below the table | That data cannot be decrypted. Always set it |
| `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET` | Decrypts everything the variable covers that was stored under the old value: app environment variables, AI provider keys, third-party credentials and database tenant connection strings | After the re-encryption, once both dry-run columns are 0. The note on automations below the table applies here too | That data cannot be decrypted. Always set it |
| `BACKEND_DATA_DB_URL_ENCRYPTION_SECRET` | Decrypts the [database tenant](https://help.teable.ai/en/basic/admin-panel/database-tenant.md) connection strings stored under the old value | After the re-encryption, once both dry-run columns are 0 | That data cannot be decrypted. Always set it |
| `BACKEND_DATA_DB_URL_ENCRYPTION_KEY` / `IV` | Decrypt the [database tenant](https://help.teable.ai/en/basic/admin-panel/database-tenant.md) connection strings stored under the old value | After the re-encryption, once both dry-run columns are 0 | Those connection strings cannot be decrypted. Always set them |
| `BACKEND_JWT_SECRET` | Verifies tokens signed with the old secret | When **Needs attention**, **Refresh failed** and **Live credentials outdated** are all empty in [JWT credentials](https://help.teable.ai/en/basic/admin-panel/jwt-credentials.md), and 30 days have passed (the lifetime of refresh tokens issued to third-party apps) | Password-protected share links ask for the password again, third-party apps have to be authorized again, and apps cannot reach Teable until their credentials are refreshed |
| `BACKEND_SESSION_SECRET` | Verifies existing login sessions | After one session lifetime (`BACKEND_SESSION_EXPIRES_IN`, 7 days by default) | Everyone signs in again |
| `BACKEND_INVITATION_SECRET` | Verifies invitation links already sent | Email invitations expire after one month. Invitation links created in a space or project never expire: once `_OLD` is removed they are still listed but no longer work, so delete them and create new ones | Pending email invitations and existing invitation links stop working; invite those people again and create new links |
| `BACKEND_MAIL_ENCRYPTION_KEY` / `IV` | Verifies the unsubscribe links in emails already sent | Your call. Unsubscribe links do not expire; removing it breaks the links in old emails | The unsubscribe links in old emails stop working |
| `BACKEND_ACCESS_TOKEN_ENCRYPTION_KEY` / `IV` | Keeps personal access tokens issued under the old key/iv working | When the [Personal access tokens](https://help.teable.ai/en/basic/admin-panel/key-rotation.md#personal-access-tokens) tab shows no token that depends on an older key | Those personal access tokens stop working at once and their owners have to regenerate them. Database tenant connection strings stored under this key/iv cannot be decrypted either |
| `BACKEND_STORAGE_ENCRYPTION_KEY` / `IV` | Not needed | — | Local-storage attachment links already issued stop working; refreshing the page fetches new ones |

Live automations run from a copy of their steps that the re-encryption does not rewrite. An automation that keeps a mail password or a webhook secret in the step itself still reads it under the old value. Before you remove `BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET_OLD` or `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET_OLD`, edit each of those automations and click **Update**, so that it runs from the re-encrypted steps. This matters only when the old value was private: under a public value these credentials were stored unencrypted.

Instead of editing each automation, you can click **Check and migrate** under [Automation credentials](https://help.teable.ai/en/basic/admin-panel/key-rotation.md#automation-credentials) on the Stored ciphertexts tab. It moves these credentials out of the steps and of every published version; each mail password becomes a secret owned by a member and granted to the automation. Remove the `_OLD` variable once that block finds nothing left and another dry-run of the re-encryption shows 0 in both columns.

`BACKEND_DATA_DB_URL_ENCRYPTION_KEY` / `IV` carry a **Deprecated** label on the page. They only serve [database tenant](https://help.teable.ai/en/basic/admin-panel/database-tenant.md) connection strings stored in the older format. Finish the re-encryption above first, which rewrites those connection strings into the format protected by `SECRET_KEY`, then delete the two variables. They need no `_OLD`.

`BACKEND_ENV_VARIABLE_SECRET`, `BACKEND_AI_CONFIG_ENCRYPTION_SECRET`, `BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET` and `BACKEND_DATA_DB_URL_ENCRYPTION_SECRET` carry the **Deprecated** label too: `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET` supersedes them. Each still takes effect while it is set, and its `_OLD` still works. Do not set them on a new deployment, and remove the ones you have as described above: a later version may stop reading them.

> [!WARNING]
>
> Never put a public or leaked value in `BACKEND_JWT_SECRET_OLD` or `BACKEND_SESSION_SECRET_OLD`. A value in `_OLD` is still accepted, so the instance would keep accepting tokens and sessions anyone can forge with it. Switch outright in that case and let users sign in again.

## Switch to your own SECRET\_KEY

When `SECRET_KEY` is not set, or is still the public default, every secret that follows it uses a public value. Putting in your own `SECRET_KEY` changes all of them at once, so the old values go into `_OLD` first to keep existing data readable.

1. Generate the new root secret:

   ```bash theme={null}
   openssl rand -base64 32
   ```

2. Prepare the `_OLD` variables. Pick the column that matches where the instance starts from, and skip a row when the page lists a dedicated variable for that secret, because its value does not change with `SECRET_KEY`:

   | Variable | `SECRET_KEY` was never set | `SECRET_KEY` was set and is being replaced |
   | - | - | - |
   | `BACKEND_ENV_VARIABLE_SECRET_OLD` | `defaultSecretKey` | The old `SECRET_KEY` |
   | `BACKEND_AI_CONFIG_ENCRYPTION_SECRET_OLD` | `defaultSecretKey` | The old `SECRET_KEY` |
   | `BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET_OLD` | `defaultSecretKey`. Most of those credentials were stored unencrypted, and the re-encryption encrypts them; some earlier versions did encrypt the secrets of MCP servers that users added | The old `SECRET_KEY` |
   | `BACKEND_INVITATION_SECRET_OLD` (optional, keeps invitation links already sent) | `defaultSecretKey` | The old `SECRET_KEY` |
   | `BACKEND_ACCESS_TOKEN_ENCRYPTION_KEY_OLD` / `IV_OLD` (keeps personal access tokens already issued) | Not needed: the built-in old values stay on automatically, for decryption only | Derived from the old `SECRET_KEY`, see the example below |
   | `BACKEND_MAIL_ENCRYPTION_KEY_OLD` / `IV_OLD` (optional, keeps unsubscribe links in emails already sent) | Not needed, as above | Derived from the old `SECRET_KEY`, see the example below |
   | `BACKEND_DATA_DB_URL_ENCRYPTION_SECRET_OLD` (if you use database tenants) | Not needed | The old `SECRET_KEY` |
   | `BACKEND_DATA_DB_URL_ENCRYPTION_KEY_OLD` / `IV_OLD` (if you use database tenants and never set this pair) | `ed333d03ac334ea2` / `3c50b81e61cb7f52` | Derived from the old `SECRET_KEY`, see the example below |
   | `BACKEND_JWT_SECRET_OLD`, `BACKEND_SESSION_SECRET_OLD` | Leave unset: the old value is public | Set them only if the old value is neither public nor leaked |

   The values "derived from the old `SECRET_KEY`" in the last column are the first 16 hex characters of a SHA-256. The [Docker Compose examples](#docker-compose-examples) below show how to compute them.

   Instead of the `_OLD` variables in the first three rows and `BACKEND_DATA_DB_URL_ENCRYPTION_SECRET_OLD`, you can set `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET_OLD` alone: `defaultSecretKey` if `SECRET_KEY` was never set, the old `SECRET_KEY` otherwise. That one variable reads all of that data.

3. Stop the instance, set the new `SECRET_KEY` and the `_OLD` variables above, and make sure `SANDBOX_JWT_SECRET` is set (the backend and the sandbox service share one value). Then start every replica.

4. From here on, follow steps 2 to 6 of [Remove the dedicated variables](#remove-dedicated-variables): dry-run, re-encrypt, refresh app credentials, spot-check, and remove each `_OLD` when its time comes. Without `BACKEND_JWT_SECRET_OLD`, apps cannot reach Teable until their credentials are refreshed, so do that in [JWT credentials](https://help.teable.ai/en/basic/admin-panel/jwt-credentials.md) right after the instance is up.

### Docker Compose `.env` examples

On a Docker Compose deployment, one of the blocks below writes the new `SECRET_KEY` and the `_OLD` variables of steps 2 and 3 into `.env` in the deployment directory. Stop the instance and back up `.env` first, and start it again with `docker compose up -d` afterwards. A block that finds `.env` in a state it does not expect, for example with `_OLD` variables already in it, says so and changes nothing. The blocks write every `_OLD` of the table: if the page lists a dedicated variable for one of those secrets, delete that secret's `_OLD` line from `.env` before you start the instance. For any other setup, add the same variables to the Teable app's environment. If you deployed with the [full-featured deployment kit](https://github.com/teableio/teable-deployment), the variables live elsewhere and are generated differently: follow the "App secrets" section of the kit's Docker or Helm README instead.

> [accordion] Example: SECRET\_KEY was never set
>
> ```bash theme={null}
> (
>   set -eu
>   if [ ! -f .env ] || grep -Eq '^(SECRET_KEY|[A-Z_]+_OLD)=' .env; then
>     echo "No .env here, or it already has SECRET_KEY or an _OLD variable: nothing changed" >&2
>     exit 1
>   fi
>   cat >> .env <<EOF
>
> BACKEND_ENV_VARIABLE_SECRET_OLD=defaultSecretKey
> BACKEND_AI_CONFIG_ENCRYPTION_SECRET_OLD=defaultSecretKey
> BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET_OLD=defaultSecretKey
> BACKEND_INVITATION_SECRET_OLD=defaultSecretKey
> BACKEND_DATA_DB_URL_ENCRYPTION_KEY_OLD=ed333d03ac334ea2
> BACKEND_DATA_DB_URL_ENCRYPTION_IV_OLD=3c50b81e61cb7f52
> SECRET_KEY=$(openssl rand -base64 32)
> EOF
> )
> ```

> [accordion] Example: SECRET\_KEY was set and is being replaced
>
> ```bash theme={null}
> (
>   set -eu
>   if grep -Eq '^[A-Z_]+_OLD=' .env; then
>     echo "An _OLD variable is already in .env: nothing changed" >&2
>     exit 1
>   fi
>   raw=$(sed -n 's/^SECRET_KEY=//p' .env | tail -n 1 | tr -d '\r')
>   old=$raw
>   case "$old" in \"*\" | \'*\') old=${old#?}; old=${old%?} ;; esac
>   if [ -z "$old" ]; then
>     echo "No SECRET_KEY value in .env: nothing changed" >&2
>     exit 1
>   fi
>   d() { printf '%s' "$1" | openssl dgst -sha256 | awk '{print $NF}' | cut -c1-16; }
>   cp -p .env .env.new
>   sed "s|^SECRET_KEY=.*|SECRET_KEY=$(openssl rand -base64 32)|" .env > .env.new
>   cat >> .env.new <<EOF
>
> BACKEND_ENV_VARIABLE_SECRET_OLD=${raw}
> BACKEND_AI_CONFIG_ENCRYPTION_SECRET_OLD=${raw}
> BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET_OLD=${raw}
> BACKEND_INVITATION_SECRET_OLD=${raw}
> BACKEND_DATA_DB_URL_ENCRYPTION_SECRET_OLD=${raw}
> BACKEND_DATA_DB_URL_ENCRYPTION_KEY_OLD=$(d "${old}")
> BACKEND_DATA_DB_URL_ENCRYPTION_IV_OLD=$(d "${old}")
> BACKEND_ACCESS_TOKEN_ENCRYPTION_KEY_OLD=$(d "${old}:teable:access-token-key")
> BACKEND_ACCESS_TOKEN_ENCRYPTION_IV_OLD=$(d "${old}:teable:access-token-iv")
> BACKEND_MAIL_ENCRYPTION_KEY_OLD=$(d "${old}:teable:mail-key")
> BACKEND_MAIL_ENCRYPTION_IV_OLD=$(d "${old}:teable:mail-iv")
> EOF
>   mv .env.new .env
> )
> ```
>
> For a routine change, where the old value is neither public nor leaked, run this next to keep users signed in:
>
> ```bash theme={null}
> (
>   set -eu
>   raw=$(sed -n 's/^BACKEND_ENV_VARIABLE_SECRET_OLD=//p' .env | tail -n 1)
>   if [ -z "$raw" ] || grep -Eq '^BACKEND_(JWT|SESSION)_SECRET_OLD=' .env; then
>     echo "Run the block above first, and only once: nothing changed" >&2
>     exit 1
>   fi
>   cat >> .env <<EOF
> BACKEND_JWT_SECRET_OLD=${raw}
> BACKEND_SESSION_SECRET_OLD=${raw}
> EOF
> )
> ```

### After the switch

Once the new `SECRET_KEY` is in place:

* Without `BACKEND_JWT_SECRET_OLD` and `BACKEND_SESSION_SECRET_OLD`, everyone signs in again, and visitors re-enter the password for password-protected share links.
* Without `BACKEND_INVITATION_SECRET_OLD`, pending email invitations and existing invitation links stop working: invite those people again and create new links.
* With local storage, attachment links copied earlier stop working. Previews work again once the page is refreshed.
* If you used the MinIO variant on the [Docker deployment](https://help.teable.ai/en/deploy/docker.md) page (`MINIO_SECRET_KEY=${SECRET_KEY}`), the MinIO root password changes along with `SECRET_KEY`. Existing files and buckets are not affected; attachment links issued earlier stop working until the page is refreshed.
* Personal access tokens, unsubscribe links, database tenant connections, AI configuration and app environment variables keep working.

If the page lists dedicated variables besides `SECRET_KEY`, deal with them afterwards as described in [Remove the dedicated variables](#remove-dedicated-variables). A variable with a value of its own does not change with `SECRET_KEY`, which is why its `_OLD` is left out above: you will need that `_OLD` for the variable's own value when you remove it.

## Optional: a separate root for stored credentials

`BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET` gives the credentials encrypted in the database a root of their own, in place of `SECRET_KEY`: app environment variables, AI configuration, third-party credentials and [database tenant](https://help.teable.ai/en/basic/admin-panel/database-tenant.md) connection strings. Once that data is under it, changing `SECRET_KEY` no longer affects it. The variable is optional: `SECRET_KEY` alone is enough.

It supersedes `BACKEND_ENV_VARIABLE_SECRET`, `BACKEND_AI_CONFIG_ENCRYPTION_SECRET`, `BACKEND_THIRD_PARTY_CREDENTIAL_ENCRYPTION_SECRET` and `BACKEND_DATA_DB_URL_ENCRYPTION_SECRET`, which each covered one kind of that data and are now deprecated. While one of them is still set, it takes precedence for its kind of data. Remove it as described in [Remove the dedicated variables](#remove-dedicated-variables); the re-encryption then moves its data under the new root.

To turn it on, `SECRET_KEY` must already be your own value:

1. Generate a value with `openssl rand -base64 32`.
2. Stop the instance, set `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET`, then start every replica. Data stored under `SECRET_KEY` stays readable without any `_OLD`: `SECRET_KEY` keeps decrypting it.
3. Run the dry-run and the re-encryption as in steps 2 and 3 of [Remove the dedicated variables](#remove-dedicated-variables).

If you cannot stop every replica at once, first set `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET_OLD` to the new value on all of them, and set the variable itself only after they have all restarted. `_OLD` encrypts nothing: it lets each replica read what the others write during the switch, and you can remove it once the variable is set everywhere.

To change the value later, put the new value in the variable and the current one in `BACKEND_STORED_CREDENTIAL_ENCRYPTION_SECRET_OLD`, then re-encrypt. That one `_OLD` reads every kind of data listed above.

## Rolling back

* **Before the re-encryption**: put the environment variables back as they were and restart. What was saved in between (credentials, AI keys, app variables, new tokens and sessions) was written under the new configuration and cannot be read under the old one; it is readable again once you switch forward.
* **After the re-encryption**: do not roll back the environment variables or move to an older image. The rewritten data only opens with the current key. If you really have to go back, restore the database and the environment variables from the backup taken before the change.

## FAQ

> [accordion] How do I confirm a variable follows SECRET\_KEY after I delete it?
>
> Look at the **Server secrets** tab again after the restart. The count of dedicated variables at the top has dropped. If the variable has an `_OLD` set, its row stays until that is removed, and **Value from** now reads **Falls back to SECRET\_KEY** or **Derived from SECRET\_KEY**; otherwise the row is gone.

> [accordion] What if the dry-run shows undecryptable rows?
>
> Neither the current key nor any configured `_OLD` opens those rows, so the re-encryption skips them and leaves them as they are. Usually an old value is missing: use the table name and row IDs the page gives, put the value those rows were encrypted with into the matching `_OLD` variable, restart, and run the dry-run again.

> [accordion] I want to keep a dedicated variable and only change its value. How?
>
> Put the new value in the variable and move the current one to the same name with `_OLD` appended. Change a key and its iv together and set both `_OLD` variables: the server refuses to start with only one. Generate these 16-character values with `openssl rand -hex 8` and everything else with `openssl rand -base64 32`. If a value has leaked, do not put it in `_OLD`; replace it outright.

> [accordion] What if the instance does not have the Key rotation page?
>
> The community edition and plans below Business do not have it. A new deployment is not affected. When an existing instance changes a secret, keep the old value in the matching `_OLD` variable and the existing data stays readable. Without the re-encryption, stored data stays under the old value until it is saved again, so leave the `_OLD` variables for stored data in place. Apps built with App Builder are the one thing to do by hand: after the JWT signing secret changes with no `BACKEND_JWT_SECRET_OLD`, rotate each app's credentials in the app itself, as described under [Teable Access Token](https://help.teable.ai/en/basic/ai/app-builder.md#teable-access-token).


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