mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-11 17:47:44 -05:00
How can I delete the users database to a reset/refreshed state? #179
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 @oliverbob on GitHub (Jan 13, 2024).
How can I reset the database record if I want to pull new changes and restart from scratch? The UI always tells me that the user exists (but I could not remember my admin password). How can I delete the old entries from which file?
Thanks.
@justinh-rahb commented on GitHub (Jan 14, 2024):
To reset the user database you can delete the /app/backend/data/ollama.db file of the container, wherever you have the data directory mounted on the host. If you have not mounted that directory or created a persistent volume for it, your ollama.db is reset each time you repull the container image.
@oliverbob commented on GitHub (Jan 14, 2024):
There are already users in this table. I guess this too needs documentation from the docs team out there. How do we change the password of a user? I don't see any password field in the table structure:
My scenario is that on proxmox, I was migrating from one machine to another. I never put into account that /var/lib/docker/volumes/ollama-webui/_data/ollama.db is not part of the cluster or the virtual environment in pve, so that I only did rsync.
I believe we should have a migration docs because man, this repo is improving at lightning speed!
And it should include migrating the volume too.
Another question I have is the structure of the table. The user table doesn't seem to have a password. Accessing the sqlite db should also be documented. This not only makes the system much more user-friendly to devs, but also leave plenty of room for customization and improvement for wishlist and experimentation for a probable PR.
@justinh-rahb commented on GitHub (Jan 14, 2024):
Perhaps a command that could be run on the container shell to reset the first admin account password as well? Deleting the whole database isn't exactly an ideal solution to a lost password if you've got other users, and chat histories you'd like to keep.
@tjbck commented on GitHub (Jan 14, 2024):
FYI, the db does not need any migration, and will continue to work after you pull the latest image.
@tjbck commented on GitHub (Jan 14, 2024):
If you'd like to start from scratch, you could always just delete the ollama.db file and you'll be able to create a new admin account. As for the password update, you can do so from the admin panel page but I presume you don't have access to it at the moment.