Skip to main content

Resetting Your Admin Password πŸ—οΈ

If you've forgotten your admin password, don't worry! Below you'll find step-by-step guides to reset your admin password for Docker 🐳 deployments and local installations of Open WebUI.

For Docker Deployments πŸ³β€‹

Follow these steps to reset the admin password for Open WebUI when deployed using Docker.

Step 1: Generate a New Password Hash πŸ”β€‹

First, you need to create a bcrypt hash of your new password. Run the following command on your local machine, replacing your-new-password with the password you wish to use:

htpasswd -bnBC 10 "" your-new-password | tr -d ':\n'

Step 2: Update the Password in Docker πŸ”„β€‹

Next, you'll update the password in your Docker deployment. Replace HASH in the command below with the bcrypt hash generated in Step 1. Also, replace admin@example.com with the email address linked to your admin account.

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

For Local Installations πŸ’»β€‹

If you have a local installation of Open WebUI, here's how you can reset your admin password directly on your system.

Step 1: Generate a New Password Hash πŸ”β€‹

Just as with the Docker method, start by generating a bcrypt hash of your new password using the following command. Remember to replace your-new-password with your new password:

htpasswd -bnBC 10 "" your-new-password | tr -d ':\n'

Step 2: Update the Password Locally πŸ”„β€‹

Now, navigate to the open-webui directory on your local machine. Update your password by replacing HASH with the bcrypt hash from Step 1 and admin@example.com with your admin account email, and execute:

sqlite3 backend/data/webui.db "UPDATE auth SET password='HASH' WHERE email='admin@example.com';"

πŸ“– By following these straightforward steps, you'll regain access to your Open WebUI admin account in no time. If you encounter any issues during the process, please consider searching for your issue on forums or community platforms.