I have searched the existing issues and discussions.
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 the WEBUI_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_FILE which accepts the path to a file that holds the WebUI Secret Key. If this environment variable isn't present and the WEBUI_SECRET_KEY environment 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_FILE to point at /run/secrets/my_secret.
Alternatives Considered
No response
Additional Context
No response
Originally created by @MicahZoltu on GitHub (Jun 7, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/14754
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
### 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 the `WEBUI_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_FILE` which accepts the path to a file that holds the WebUI Secret Key. If this environment variable isn't present and the `WEBUI_SECRET_KEY` environment 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_FILE` to point at `/run/secrets/my_secret`.
### Alternatives Considered
_No response_
### Additional Context
_No response_
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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