I am deploying open-webui in Fargate, and when I have multiple instances running and attempt to login, it fails since it is behind a round-robin load balancer and the other containers' states are not in sync with the state of the container that initiated the login.
Originally created by @computerdane on GitHub (Mar 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11606
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
- [x] I am using the latest version of Open WebUI.
### Installation Method
Docker
### Open WebUI Version
v0.5.20
### Ollama Version (if applicable)
_No response_
### Operating System
Linux
### Browser (if applicable)
_No response_
### Confirmation
- [x] I have read and followed all instructions in `README.md`.
- [x] I am using the latest version of **both** Open WebUI and Ollama.
- [x] I have included the browser console logs.
- [x] I have included the Docker container logs.
- [x] I have listed steps to reproduce the bug in detail.
### Expected Behavior
OAuth state should sync between multiple instances that are behind a load balancer
### Actual Behavior
OAuth state does not persist, and logins fail
### Steps to Reproduce
1. Deploy multiple instances of open-webui with an OIDC integration
2. Attempt to log in
### Logs & Screenshots
N/A
### Additional Information
Related to https://github.com/open-webui/open-webui/issues/10365
I am deploying open-webui in Fargate, and when I have multiple instances running and attempt to login, it fails since it is behind a round-robin load balancer and the other containers' states are not in sync with the state of the container that initiated the login.
Possible fix on my branch: https://github.com/computerdane/open-webui/commit/85bdb4ac67c5272e65b60a30bfb24dc7d22f6ec3. Once I am able to test this change I will submit a PR and link it to this issue.
GiteaMirror
added the bug label 2026-05-13 02:52:39 -05:00
Ok, turns out I just needed to set the WEBUI_SECRET_KEY environment variable for all of the containers to the same thing, since the Docker image randomizes it. I didn't even need the Redis cache for authlib or anything
<!-- gh-comment-id:2722224118 -->
@computerdane commented on GitHub (Mar 13, 2025):
Ok, turns out I just needed to set the `WEBUI_SECRET_KEY` environment variable for all of the containers to the same thing, since the Docker image randomizes it. I didn't even need the Redis cache for authlib or anything
@computerdane Hit the same issue, same fix. Would be good to add a hint to the documentation of WEBUI_SECRET_KEY.
<!-- gh-comment-id:2726292093 -->
@Ithanil commented on GitHub (Mar 15, 2025):
@computerdane Hit the same issue, same fix. Would be good to add a hint to the documentation of `WEBUI_SECRET_KEY`.
<!-- gh-comment-id:2726697190 -->
@computerdane commented on GitHub (Mar 15, 2025):
@Ithanil https://github.com/open-webui/docs/pull/448/commits/108d01c73dd96259caf45fe2739c60b0b871d55c looks like this PR will update the docs accordingly
<!-- gh-comment-id:2726701893 -->
@taylorwilsdon commented on GitHub (Mar 15, 2025):
> [@computerdane](https://github.com/computerdane) Hit the same issue, same fix. Would be good to add a hint to the documentation of `WEBUI_SECRET_KEY`.
There are no published docs on Open-WebUI's site about this currently, but I have a PR that adds them ready to go here https://github.com/open-webui/docs/pull/448
@taylorwilsdon commented on GitHub (Mar 15, 2025):
@taylorwilsdon lol looks like we found each other at the same time
just two souls passing in the night
<!-- gh-comment-id:2726706782 -->
@taylorwilsdon commented on GitHub (Mar 15, 2025):
> [@taylorwilsdon](https://github.com/taylorwilsdon) lol looks like we found each other at the same time
just two souls passing in the night
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 @computerdane on GitHub (Mar 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11606
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.5.20
Ollama Version (if applicable)
No response
Operating System
Linux
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
OAuth state should sync between multiple instances that are behind a load balancer
Actual Behavior
OAuth state does not persist, and logins fail
Steps to Reproduce
Logs & Screenshots
N/A
Additional Information
Related to https://github.com/open-webui/open-webui/issues/10365
I am deploying open-webui in Fargate, and when I have multiple instances running and attempt to login, it fails since it is behind a round-robin load balancer and the other containers' states are not in sync with the state of the container that initiated the login.
Possible fix on my branch: https://github.com/computerdane/open-webui/commit/85bdb4ac67c5272e65b60a30bfb24dc7d22f6ec3. Once I am able to test this change I will submit a PR and link it to this issue.
@computerdane commented on GitHub (Mar 13, 2025):
Ok, turns out I just needed to set the
WEBUI_SECRET_KEYenvironment variable for all of the containers to the same thing, since the Docker image randomizes it. I didn't even need the Redis cache for authlib or anything@Ithanil commented on GitHub (Mar 15, 2025):
@computerdane Hit the same issue, same fix. Would be good to add a hint to the documentation of
WEBUI_SECRET_KEY.@computerdane commented on GitHub (Mar 15, 2025):
@Ithanil https://github.com/open-webui/docs/pull/448/commits/108d01c73dd96259caf45fe2739c60b0b871d55c looks like this PR will update the docs accordingly
@taylorwilsdon commented on GitHub (Mar 15, 2025):
There are no published docs on Open-WebUI's site about this currently, but I have a PR that adds them ready to go here https://github.com/open-webui/docs/pull/448
@computerdane commented on GitHub (Mar 15, 2025):
@taylorwilsdon lol looks like we found each other at the same time
@taylorwilsdon commented on GitHub (Mar 15, 2025):
just two souls passing in the night