mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #14754] feat: Add WEBUI_SECRET_KEY_FILE environment variable. #17354
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MicahZoltu on GitHub (Jun 7, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14754
Check Existing Issues
Problem Description
Docker Swarm secrets can only be added to the container as files, and only in a specific location (
/run/secrets/*). Currently, in order to set theWEBUI_SECRET_KEY, you either need to provide the secret as an environment variable, or by providing a file at/app/backend/.webui_secret_key, neither of which are secure ways to manage secrets in Docker.Desired Solution you'd like
Add an environment variable called
WEBUI_SECRET_KEY_FILEwhich accepts the path to a file that holds the WebUI Secret Key. If this environment variable isn't present and theWEBUI_SECRET_KEYenvironment variable isn't present, then it would fallback to looking for the secret key in its current location in/app/backend/.webui_secret_key.This way, a docker swarm user can setup a Docker Secret and then set
WEBUI_SECRET_KEY_FILEto point at/run/secrets/my_secret.Alternatives Considered
No response
Additional Context
No response