mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #7329] Possible to keep users logged in on update? #53370
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 @tkafka on GitHub (Nov 25, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7329
Feature Request
Is your feature request related to a problem? Please describe.
Right now, whenever I update the open-webui docker, all logins are invalidated, so everyone has to log in again, which is uncomfortable, plus (without knowing the user has been signed out on a server) it usually takes a failed (lost) conversation message before the client realizes it's not signed in.
Thanks for looking into this!
Update commands:
Describe the solution you'd like
I would like the docker update to preserve the logged-in users.
Describe alternatives you've considered
Is there some folder which stores user sessions, that could be mapped into a persistent volume to survive the update?
Additional context
My
docker-compose.yml:@tkafka commented on GitHub (Nov 25, 2024):
My investigation so far:
Open-webui seems to be using Starlette as:
d870386d7d/backend/open_webui/main.py (L2571)ChatGPT says: SessionMiddleware by default uses an in-memory store for sessions if no storage backend is configured. This is volatile and explains why sessions are lost when the container is restarted or updated.
Can we add a simple filesystem-based session store?
It should be done like this:
Then map the directory in your docker-compose.yml:
The drawbacks are that some users might prefer a fast in-memory store, so I think it would be better to introduce some env var like eg.
WEBUI_SESSION_STORAGE_FOLDERand use it only if the user provides it.What do you think?