docs/docs/troubleshooting/password-reset.mdx
Silentoplayz 6cf3118117 small bump
small bump
2024-12-18 18:36:43 -05:00

52 lines
2.2 KiB
Plaintext

---
sidebar_position: 1
title: "🔑 Reset Admin Password"
---
# 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:
```bash
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.
```bash
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:
```bash
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:
```bash
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.