Skip to content

Helm Chart: Required JWT Secret ​

The API uses the JWT secret to sign login tokens. Chart 0.20.0 and earlier have a default value for this secret. Later charts have no default, and they do not render until you supply your own secret.

Who Must Act ​

You must act before you upgrade if global.existingSecret is not set and one of these is true:

  • Your values do not set the0Api.env.JWT_SECRET. This includes installs that set JWT_SECRET only through the0Api.extraEnv.
  • the0Api.env.JWT_SECRET is empty, or it is one of the placeholders that the chart published (your-jwt-secret-key or CHANGEME).

If you use global.existingSecret, the chart renders as before. The chart cannot read the values in that Secret. Make sure that its jwt-secret key is your own secret value and not a placeholder.

Docker Compose installs do not change.

To check a release, do a dry run with the same flags and values files that you use to upgrade:

bash
helm repo update
helm upgrade the0 the0/the0 --namespace the0 -f values.yaml --dry-run > /dev/null

You must act if the output contains this message:

text
the0Api.env.JWT_SECRET is missing or is a placeholder.

What Changes ​

BeforeAfter
The chart has a default the0Api.env.JWT_SECRETThe value is empty, and you must supply it or set global.existingSecret
The chart accepts its published placeholdersThe chart refuses them, also with helm upgrade --reuse-values
The default values set the0Frontend.env.JWT_SECRETThis value is removed. The frontend does not use it, and you can remove it from your values

If the secret is missing, the upgrade fails before Helm changes the cluster. The installed release continues to run with its old secret until you complete the upgrade.

Active Logins End ​

A new JWT secret makes all existing login tokens invalid. All users must sign in to the web app again after the API restarts, so plan the upgrade for a suitable time. API keys continue to work, which includes the CLI and MCP clients. A new JWT secret does not affect bots.

If you set JWT_SECRET only through the0Api.extraEnv, that value is already your own secret. Supply the same value as shown below and keep the extraEnv entry. Active logins then continue to work.

Supply The Secret ​

Make a secret value:

bash
openssl rand -hex 32

Make it one time only, and use the same value for each upgrade. Then use one of these methods. For production, use an existing Secret.

Use An Existing Secret ​

global.existingSecret replaces the full Secret that the chart makes, not only the JWT secret. Create a Secret with these keys:

  • database-url
  • mongo-url
  • minio-access-key
  • minio-secret-key
  • jwt-secret
  • postgresql-password, if the chart runs PostgreSQL
  • mongodb-root-password, if the chart runs MongoDB

Use your current values for all keys except jwt-secret.

Realtime bot pods read their storage credentials from this Secret. They restart when its name changes.

Use a new Secret name

Do not use the name of the Secret that the chart made, which is the0-secrets for a release with the name the0. Helm deletes that Secret when you set global.existingSecret.

Create the Secret through your usual secret workflow, such as Sealed Secrets or External Secrets. Then set its name in your values:

yaml
global:
  existingSecret: "the0-credentials"

Use A Helm Value ​

Set the value in a private values file. Do not commit this file in plaintext:

yaml
the0Api:
  env:
    JWT_SECRET: ""  # Put your secret value here

Upgrade ​

bash
helm upgrade the0 the0/the0 --namespace the0 -f values.yaml
kubectl rollout status deploy/the0-api --namespace the0

The new chart version restarts the API, which then uses the new secret. If you change only the secret later, restart the API yourself:

bash
kubectl rollout restart deploy/the0-api --namespace the0

Then sign in to the web app to make sure that login works.

Rolling Back ​

helm rollback also restores the old values, which include the old JWT secret. To go back to an earlier chart and keep your new secret, upgrade to that chart version with your current values:

bash
helm upgrade the0 the0/the0 --namespace the0 --version 0.20.0 -f values.yaml

Released under the Apache 2.0 License.