Skip to main content

Secrets and rotation

The app needs two secrets of its own: SECRET_KEY, and SANDBOX_JWT_SECRET when it runs the sandbox. Every other secret (JWTs, sessions, the various encryption keys) uses SECRET_KEY directly, or a key derived from it, when it has no variable of its own. You don’t need to set them, and it is not recommended: a later version may stop reading most of these dedicated variables. The server checks its secrets once at startup, but a missing secret never blocks startup: Teable falls back to the default built into older versions, logs the missing variables, and starts. Those built-in values are public, so anyone can forge tokens or decrypt data protected by them. That is fine for a quick local try-out and unsafe for anything else.
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 before upgrading to that version.
New deployment. Generate a random value for each of the two secrets and leave the other variables unset:
Back up SECRET_KEY together with the database. Encrypted data can only be decrypted with the key it was written with. Existing deployment. Do not add or change SECRET_KEY in place. The secrets that follow it change with it, so existing sessions and tokens stop working and the data already encrypted in the database can no longer be decrypted. Follow Secret convergence instead. The Key rotation page in System Admin lists the dedicated variables an instance still sets.
The startup log also warns when a secret is explicitly set to a publicly known former default. The instance keeps running so your data stays reachable, but anyone can forge tokens or decrypt data protected by that value. Rotate it.
Last modified on November 27, 2026