Resetting Your Admin Password
Step-by-step guides for resetting your admin password in Docker and local installations.
For Docker Deployments
Step 1: Generate a New Password Hash
Create a bcrypt hash of your new password. Replace
your-new-password
with the password you want to use:
htpasswd -bnBC 10 "" your-new-password | tr -d ':\n'
The output will include a bcrypt hash with special characters. Any
$
characters in the hash must be triple-escaped (replaced with
\\\
) when used in the Docker command in Step 2.
Step 2: Update the Password in Docker
Replace
HASH
with the bcrypt hash from Step 1 (triple-escaping any
$
characters) and
[email protected]
with your admin email:
docker run --rm -v open-webui:/data alpine/socat EXEC:"bash -c 'apk add sqlite && echo UPDATE auth SET password='\''HASH'\'' WHERE email='\''[email protected]'\''; | sqlite3 /data/webui.db'", STDIO
If the above command fails, use the alternate method below.
Alternate Docker Method
The one-liner above can fail in some environments because the
alpine/socat
image does not include
bash
. Use this step-by-step approach instead:
Start an Alpine container with the Open WebUI volume mounted:
docker run -it --rm -v open-webui:/data alpine
Install required tools:
apk add apache2-utils sqlite
Generate the bcrypt hash:
htpasswd -bnBC 10 "" your-new-password | tr -d ':'
Update the password:
sqlite3 /data/webui.db
UPDATE auth SET password='HASH' WHERE email='[email protected]';
-- Exit sqlite: Ctrl+D
For Local Installations
Step 1: Generate a New Password Hash
htpasswd -bnBC 10 "" your-new-password | tr -d ':\n'
Step 2: Update the Password
Navigate to the
open-webui
directory and run:
sqlite3 backend/data/webui.db "UPDATE auth SET password='HASH' WHERE email='[email protected]';"
Replace
HASH
with the bcrypt hash from Step 1 and
[email protected]
with your admin email.
Resetting All Data
If you want to
completely reset
Open WebUI, including all user data, settings, and passwords, delete the
webui.db
file.
Step 1: Locate
webui.db
If you're unsure where
webui.db
is located, find it with a Python shell:
import os
import open_webui
# Show where the Open WebUI package is installed
print("Open WebUI is installed at:", open_webui.__file__)
# Construct the expected database path
db_path = os.path.join(os.path.dirname(open_webui.__file__), "data", "webui.db")
if os.path.exists(db_path):
print("webui.db found at:", db_path)
else:
print("webui.db not found at:", db_path)