docs: add guide for rotating LANGFLOW_SECRET_KEY (#6091)

docs: Add guide for rotating LANGFLOW_SECRET_KEY
This commit is contained in:
Mendon Kissling 2025-02-03 11:27:28 -05:00 committed by GitHub
commit ea5806f30e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -169,6 +169,18 @@ The generated secret key value is now used to encrypt your global variables.
If no key is provided, Langflow will automatically generate a secure key. This is not recommended for production environments, because in a multi-instance deployment like Kubernetes, auto-generated keys won't be able to decrypt data encrypted by other instances. Instead, you should explicitly set the `LANGFLOW_SECRET_KEY` environment variable in the deployment configuration to be the same across all instances.
### Rotate the LANGFLOW_SECRET_KEY
To rotate the key, follow these steps.
1. Create a new `LANGFLOW_SECRET_KEY` with the command in [Create a LANGFLOW_SECRET_KEY](#create-a-langflow_secret_key).
2. Stop your Langflow instance.
3. Update the `LANGFLOW_SECRET_KEY` in your `.env` file with the new key.
4. Restart Langflow with the updated environment file:
```bash
langflow run --env-file .env
```
### LANGFLOW_NEW_USER_IS_ACTIVE
By default, this variable is set to `False`. When enabled, new users are automatically activated and can log in without requiring explicit activation by the superuser.