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 admin@example.com 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='\''admin@example.com'\''; | sqlite3 /data/webui.db'", STDIOIf 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.dbUPDATE auth SET password='HASH' WHERE email='admin@example.com'; -- 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='admin@example.com';"Replace HASH with the bcrypt hash from Step 1 and admin@example.com 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.