Forgot your Open WebUI admin password? There is no “forgot password” email link in a self-hosted install, but you can still get back in. You create a new bcrypt password hash and write it into the auth table of the webui.db SQLite database.
It takes about five minutes and does not touch your chats or settings.
This works for the default SQLite setup in Docker and in local pip, uv or git installs. If you have other admins, the quickest fix is simply asking one of them to reset your password from the Admin Panel.
This guide covers the easy fix first, then step-by-step resets for Docker and local installs, how to find your admin email and database file, a full reset, and fixes for common errors. It follows the official Open WebUI documentation as of December 2026.
- Other admin? Ask them to edit your user in Admin Panel > Users.
- Docker:
docker run -it --rm -v open-webui:/data alpine, thenapk add apache2-utils sqlite. - Hash:
htpasswd -bnBC 10 "" your-new-password | tr -d ':' - Update:
UPDATE auth SET password='HASH' WHERE email='admin@example.com';insqlite3 /data/webui.db. - Email: stored in lowercase. Find it with
SELECT email, role FROM user WHERE role = 'admin'; - Last resort: deleting
webui.dbwipes everything, including chats.
How the Reset Works
Open WebUI stores passwords as bcrypt hashes, never as plain text. The user table holds each account’s email and role, and the auth table holds the email and password hash. To reset a password you:
- Turn your new password into a bcrypt hash with
htpasswd. - Open
webui.dbwithsqlite3. - Replace the hash for your admin email in the
authtable. - Sign in with the new password.
| Install type | Where webui.db lives |
|---|---|
| Docker | In the open-webui volume, at /app/backend/data/webui.db |
| uv quick start | The DATA_DIR folder, often ~/.open-webui |
| pip without DATA_DIR | Inside the installed package’s data folder |
| git clone | backend/data/webui.db |
Not sure how your instance was set up? Our Open WebUI with Ollama setup guide shows the standard Docker install this guide assumes.
If your instance uses PostgreSQL or another external database, the same UPDATE auth idea applies, but run it with that database’s client instead of sqlite3.
Easy Fix: Ask Another Admin
If anyone else on your instance has the admin role, they can open Admin Panel > Users, edit your account and set a new password. No terminal needed. Our Open WebUI users, groups and permissions guide shows the admin screens.
It is also good practice to keep a second admin account for exactly this reason.
Back Up First
You are editing the live database, so take a copy first. For Docker:
docker run --rm -v open-webui:/data -v $(pwd):/backup \
alpine tar czf /backup/openwebui-$(date +%Y%m%d).tar.gz /data
For a local install, copy webui.db to a safe place while Open WebUI is stopped.
Reset the Password in Docker
This step-by-step method is the most reliable. It assumes your volume is called open-webui; check with docker volume ls if unsure.
- Start a temporary Alpine container with the volume mounted:
docker run -it --rm -v open-webui:/data alpine - Install the tools inside it:
apk add apache2-utils sqlite - Create the hash for your new password:
htpasswd -bnBC 10 "" your-new-password | tr -d ':'Copy the output, which starts with
$2y$10$. - Open the database:
sqlite3 /data/webui.db - If you do not remember the admin email, list admins:
SELECT email, role FROM user WHERE role = 'admin'; - Write the new hash:
UPDATE auth SET password='HASH' WHERE email='admin@example.com'; - Confirm one row changed:
SELECT changes();It should print
1. - Press Ctrl+D to leave sqlite3, then type
exitto leave the container. - Sign in to Open WebUI with the new password.
Inside the sqlite3 shell you paste the hash as-is in single quotes; no escaping is needed.
Docker One-Line Method
The docs also give a single command. Generate the hash first with htpasswd -bnBC 10 "" your-new-password | tr -d ':\n', then run:
docker run --rm -v open-webui:/data alpine/socat EXEC:"bash -c 'apk add sqlite && echo UPDATE auth SET password='\''HASH'\'' WHERE email='\''admin@example.com'\''; | sqlite3 /data/webui.db'", STDIO
Here every $ in the hash must be triple-escaped (written as \\\$), which is easy to get wrong. The alpine/socat image also may not include bash, so if this fails, use the step-by-step method above.
Reset the Password in a Local Install
- Install
htpasswd(packageapache2-utilson Debian/Ubuntu,httpd-toolson Fedora) andsqlite3. - Create the hash:
htpasswd -bnBC 10 "" your-new-password | tr -d ':\n' - Find
webui.db(next section). - List admin emails:
sqlite3 /path/to/webui.db "SELECT email, role FROM user WHERE role = 'admin';" - Update the password:
sqlite3 /path/to/webui.db "UPDATE auth SET password='HASH' WHERE email='admin@example.com';" - Restart Open WebUI and sign in.
In a bash shell, the $ signs inside the double-quoted command can be read as variables. If sign-in still fails, run the update inside the interactive sqlite3 /path/to/webui.db shell instead, where the hash is pasted literally.
No htpasswd on Windows or macOS? Use the Docker method’s Alpine container just to generate the hash: docker run --rm alpine sh -c "apk add -q apache2-utils && htpasswd -bnBC 10 '' your-new-password | tr -d ':'".
Find Your webui.db File
- You set DATA_DIR (the uv quick start uses
~/.open-webui):webui.dbis in that folder. - pip without DATA_DIR: activate the same virtual environment, then run:
python -c "import open_webui, os; print(os.path.join(os.path.dirname(open_webui.__file__), 'data', 'webui.db'))"If it says
No module named 'open_webui', the environment is not active. - git clone:
backend/data/webui.dbin the repository. - Docker with a bind mount: look in the host folder mapped to
/app/backend/data.
Reset Everything
If you want a completely fresh start, stop Open WebUI and delete the database:
rm /path/to/webui.db
For Docker, removing the volume (docker volume rm open-webui) has the same effect. This deletes all accounts, settings, chats and passwords. The next person to sign up becomes the admin. Only do this if you truly want to lose everything, and take a backup first.
Avoid Getting Locked Out Again
- Create a second admin account and store its password in a password manager.
- Keep regular backups of the data volume, especially before updates. See our how to update Open WebUI guide.
- Set a fixed
WEBUI_SECRET_KEYso updates do not log everyone out. - For teams, consider SSO so passwords are managed by your identity provider.
Check Which Install You Have
The right method depends on how Open WebUI was installed. If you are not sure, check:
- Run
docker ps. If you see a container using an image likeghcr.io/open-webui/open-webui, you have a Docker install. Note the container name. - Run
docker inspect open-webui --format '{{range .Mounts}}{{.Name}} {{.Source}} -> {{.Destination}}{{println}}{{end}}'to see which volume or folder is mounted at/app/backend/data. Use that name instead ofopen-webuiin the commands below if it differs. - No container? Run
pip show open-webuiinside your virtual environment. If it prints a version, you have a pip install. - If you start Open WebUI from a cloned folder with a
backenddirectory, it is a git install.
Getting the volume or path right matters: editing a different database file changes nothing, and is the most common reason a reset “does not work”. If the Open WebUI desktop app manages your server, look for its data folder in the app’s settings before editing anything.
Troubleshooting
sqlite3 prints nothing and the password did not change
Your WHERE clause matched no rows. Emails are stored in lowercase, so use the exact lowercase address. Check with SELECT changes();.
“no such table: auth”
You opened the wrong file or an empty new database. Check the path, and for Docker check the volume name with docker volume ls.
“bash: not found” with the one-liner
The alpine/socat image lacks bash. Use the step-by-step Alpine method.
Still “incorrect password” after the update
The hash was mangled by shell escaping. Redo the update inside the interactive sqlite3 shell and paste the hash in single quotes.
“No module named ‘open_webui’”
Activate the virtual environment you run Open WebUI from before printing the path.
Sign-up page appears instead of login
The database is new or empty, often because the container used a different volume. Reattach the original volume.
Changes vanish after restart
You edited a copy. Make sure you edited the file in the volume or DATA_DIR that Open WebUI actually uses.
FAQ
Does resetting the password delete my chats?
No. Only the password hash changes. Deleting webui.db is what wipes data.
Is there a forgot-password email?
Not in a default self-hosted install. Use another admin or the database method.
Can I reset a normal user’s password this way?
Yes, with their email, but it is easier to do it from Admin Panel > Users as an admin.
What cost factor should the hash use?
The docs use -C 10 with htpasswd -B, which creates a bcrypt hash Open WebUI accepts.
Does this work for Open WebUI with PostgreSQL?
The same UPDATE auth query works, run through your PostgreSQL client instead of sqlite3.
Can I disable login completely?
Single-user setups can turn authentication off with WEBUI_AUTH=False on a fresh install, but never on a shared or internet-facing server.



