How to reset a lost Open WebUI admin password without losing data
Recovering a lost Open WebUI admin password usually means writing a new bcrypt hash for an admin user directly into the database, which is a privileged change to production data that should be planned, logged and reversible. Teams need this procedure when no admin can sign in, when the only admin's password has been forgotten, or when the admin account depends on an identity provider that has stopped working. The approach depends on the database in use (SQLite in the data directory or PostgreSQL) and on the release installed, so confirm the table names, column names and hash format against the exact release before editing anything. The release history includes v0.12.3, published on October 16, 2026, and later releases may change how user records or password hashes are stored.
Before touching the database, take a backup of the data directory or PostgreSQL database and record the release tag, container image digest and the admin user's ID and email. Confirm that the secret key used by the deployment is stored outside the data directory, because a restored copy must run with the same key. Plan the change as a short maintenance window with a named engineer, a second person to review the SQL, and a written rollback step. Check the reset on a copy of the database first, then confirm sign-in works with the new password and that chats, models and settings still exist for the admin and other users.
Account recovery also needs a plan for SSO admins. If the admin account is created through OIDC, LDAP or another identity provider, a local password may be unused or unknown, so a hash edit may not restore access even when the database write succeeds. Before you rely on any password path, confirm which sign-in methods the admin account accepts and whether a second local admin exists. Keep at least one break-glass admin account with a password stored in your secrets system, test it on a schedule, and document who may use it. Review the procedure whenever the release or identity configuration changes, since the steps that worked on one version may not apply to the next.
Which recovery path fits your admin account
This table compares four ways to regain admin access to Open WebUI, covering prerequisites, data risk, the audit trail each leaves and when it fits. Read each row against your own deployment, since the right path depends on how your admin account signs in and whether a recent backup exists.
| Recovery path | Prerequisites | Data and audit trail | When it fits |
|---|---|---|---|
| Direct hash update for a local admin | Database access, a shell or container exec into the Open WebUI environment, and a bcrypt tool to generate the new hash | Changes one row in the users table only; no chat or file data is touched, but the change is not logged by Open WebUI, so record it in your change ticket | Local admin account with a password you cannot recall and no working SSO path |
| Promoting an existing working user to admin | Database access and a second account that already signs in successfully | Changes the role field on one user; chats and uploads stay in place, and the promotion leaves no application log entry, so document who was promoted and why | Another trusted user exists, the original admin is gone or unreachable, and you want to avoid editing credentials |
| Signing in through a surviving SSO or directory path | An identity provider or LDAP directory still configured for Open WebUI, and an account mapped to an admin role | No database edits; sign-in events are recorded by the identity provider and role changes follow your admin configuration | SSO or LDAP is already the normal login method and the admin role is granted through the identity provider |
| Restoring the database from a pre-lockout backup | A verified backup taken before the lockout, the matching secret key and access to the stop, restore and start procedure | Rolls back all data written after the backup, including chats, uploads and settings changed since then; the restore itself is outside Open WebUI's own audit trail | Credentials cannot be recovered by any other path and the loss of recent data is acceptable to the business owner |
Choosing a recovery path for a locked-out admin
The decision starts with a check for another admin account or a working SSO login, since that is the least invasive way back in. If neither exists, the next question is whether a recent database backup can be restored and verified. Direct database access during a planned change window is the last route before the hash update itself, and each step ends with a check that an admin can sign in. Whatever path is used, the final step is to rotate credentials and review the admin accounts.
Decision path for recovering admin access, from least to most invasive.
Resetting the Open WebUI admin password step by step
This sequence restores sign-in for an Open WebUI administrator by replacing one password hash in the database, with a backup and a check at every point so the change can be reversed and audited.
Freeze writes and capture a recovery point
Before touching anything, the operator stops or pauses Open WebUI traffic so no writes land during the change, then takes a snapshot or dump of the database (SQLite file or PostgreSQL). Record where the secret key is stored and copy that location's configuration as well, because the database alone does not restore a working deployment. Confirm the snapshot is readable by restoring it to a scratch location or listing its contents. The step is done when a dated copy exists outside the live data directory and the operator has written down the backup path.
Confirm the installed release and schema
Identify the exact Open WebUI version running in the container image, package or virtual environment, since table names, column names and the password hash format can change between releases. Check the release notes for the installed version on the project's GitHub releases page and inspect the live schema with a read-only query. Confirm the table that stores users and the column that holds the password hash. The step is done when the version, the user table name and the hash column are written in the change record and match what the database reports.
Locate the admin user record
Query the users table for accounts with the admin role, using a read-only select that returns the account ID, email and role but not the password hash. Confirm which account is the one that needs recovery, and note whether any other admin exists. If the only admin is tied to SSO, record that, because the password change will not affect SSO sign-in. The step is done when the target user ID is recorded and the operator has confirmed it is the intended account, not a similar address.
Generate a bcrypt hash in a controlled environment
On a workstation or a short-lived container that is not shared with other users, generate a temporary password of adequate length and create a bcrypt hash of it using a bcrypt library. Confirm the hash format (the prefix and cost factor) matches the hashes already stored for other users in the same table, so Open WebUI can verify it. Avoid pasting the plaintext password into shell history or chat tools, and record it only in the team's approved secret store. The step is done when a hash string is produced and a test verification against the plaintext returns true.
Update only the password field for that admin
Run a single update statement that sets the password hash column for the target user ID and nothing else, wrapped in a transaction where the database supports it. Include a WHERE clause on the user ID so no other row changes, and check the affected row count returns exactly one. Do not change the role, email or other fields in the same statement. The step is done when the row count is one, a select shows the new hash for that ID only, and the change record notes the time and operator.
Restart the service and confirm sign-in
Restart Open WebUI using the method your team runs (for example the Docker Compose service, the Kubernetes deployment or the systemd unit), and confirm the process starts cleanly and the health endpoint responds. Then sign in as the recovered admin with the temporary password from a browser that has no cached session. Verify that the admin area loads and that the account can see the user list. The step is done when the sign-in succeeds and the admin dashboard loads without errors in the service logs.
Rotate the temporary password and review other admins
Change the temporary password to a new one through the Open WebUI account settings so only the account holder knows the final value, then discard the temporary value from the secret store. Review every remaining admin account, remove any that are unused, and confirm that at least one admin is covered by an SSO path or a second recovery method. Record the incident, the cause of the lockout and the change to the runbook. The step is done when the temporary password no longer works, the admin list is reviewed and the record is filed.
Running the reset in Docker, Kubernetes or a local install
Docker and Docker Compose installs keep data in a named volume or bind mount, and the container name is what you pass to every command, so confirm both before you change anything. If Open WebUI uses SQLite, the database file sits inside the data volume. If it uses an external PostgreSQL service, the reset runs against that server and the container only holds the connection setting. Read the running container's configuration first so you know which case applies.
- Find the database. Run
docker compose psto confirm the service name, thendocker inspecton the container to check the data mount and the database connection variable. Confirm the variable names against the documentation for your image version. - Stop the writer. Stop the Open WebUI container before you edit anything, so no process writes to the user table during the change. Stopping is safer than editing a file the running process holds open.
- Back up first. Copy the SQLite file or take a PostgreSQL dump, and store the copy outside the volume. Record the image tag so you can roll back.
- Test, then apply. For SQLite, run the statement against a copy of the file with the
sqlite3tool before the original. For PostgreSQL, connect with the account that owns the Open WebUI schema and run the update inside a transaction. - Restart and check. Start the container, read the startup logs for errors, then sign in with the new password. Existing sessions may still work if no Redis store is in use, because tokens stay valid until they expire, by default after 4 weeks.
Before you close the task, confirm that the admin signs in, that the role on the account is still admin and that the container reports healthy.
In a Kubernetes install, the database is usually a PostgreSQL pod managed by a chart or an external managed service. Changes should follow the same access path your platform team uses for production, such as an approved client pod, a bastion host or the managed service console under a change ticket, rather than a shell inside the application pod. The Helm release tells you which values, secret and database host the deployment uses, so start there. The scaling guide explains why multi-replica setups need PostgreSQL and shared state.
- Read the release. Run
helm get valuesfor the release andkubectl get secretto find the database credentials. Record the namespace, release name and chart version in the change record. - Scale the deployment down. Scale the Open WebUI deployment to zero replicas so no pod writes during the change. Before scaling back up, confirm that the shared state and file storage each replica needs are still in place.
- Use a controlled session. Open the database session through your approved path, run the hash update in a transaction and record who ran it and when. Avoid storing the new hash in shell history or in a values file.
- Watch the rollout. Scale back up, then follow
kubectl rollout statusand the pod logs. Wait for the readiness probe to pass before you test sign-in. - Check shared sessions. If replicas share sessions through Redis, confirm that the reset took effect for active sessions. Without Redis, tokens stay valid until they expire, so plan for that window and tell the admin team.
After the rollout, confirm that the admin signs in through the ingress, that the change record matches the database change and that no pod restarted repeatedly during the update.
A local install started with pip install open-webui and open-webui serve keeps its data directory and SQLite file on the host, usually under the user account that started the server. There is no container boundary, so the main risk is writing to the database file while the server is still running. Find the data directory from the environment variables or the start command, and confirm the default location for your version in the documentation before you assume it.
- Locate the data directory. Check the
DATA_DIRsetting if one is defined in the environment or service file. If it is not set, confirm the default path for the user that runs the process. - Stop the server. Shut down
open-webui servecleanly, then confirm that no process still holds the database file. Tools such aslsofon the file path show open handles. - Copy the whole directory. Back up the entire data directory, including the database file and the secret key, to a dated location. Store the secret key with the backup so a restore can decrypt what it needs.
- Test the update on a copy. Open the copied file with
sqlite3, check the role column to confirm the target row is the admin account, then run the update. Apply the same statement to the original only after the copy behaves as expected. - Restart and verify. Start
open-webui servein the same environment and read the console output for migration or startup errors before you sign in. Confirm whether existing sessions still work, since token behavior depends on your setup.
Before you finish, confirm that the admin signs in from the browser, that the account role is still admin and that the data directory has a current backup taken after the change.
Security risks in a manual Open WebUI password reset
A direct database reset gets admin access back, but it sits outside the application's normal controls. The cards below name the risks that follow from that shortcut and the control to apply to each, so the recovery does not create a second incident.
Direct writes skip application audit
Writing a new hash straight into the database bypasses the login and admin code paths, so the application may record no event for the change. Anyone reviewing the admin account later may not see when the credential changed or who changed it. Before you start, record the change in your own change ticket with the operator, time and reason, and check the database and container logs for the write window.
Open WebUI featuresTemporary passwords leak through history
A one-off password placed in a shell command can end up in shell history, terminal scrollback, CI logs or a pasted ticket. Treat any temporary credential as exposed once it has been typed or shared in plain text. Generate the new password on the host, avoid putting it in command arguments where possible, and rotate it after the first successful sign-in.
Old sessions remain valid
Sessions issued before the reset do not disappear because the password changed. Without Redis, signing out does not revoke tokens, and they stay valid until they expire, by default after 4 weeks. Confirm the token lifetime in your environment, and if the reset responds to a suspected compromise, plan to invalidate existing sessions rather than assume the old ones are gone.
Scaling Open WebUI docsReplicas may keep stale state
In a multi-replica deployment, the shared state layer carries sessions and application state between instances. A reset applied to one replica, or to a database that other replicas do not read as expected, can leave some instances serving the old state. Confirm that every replica reaches the same database and Redis, then test sign-in against each replica after the change.
Backups keep old hashes
Every backup taken before the reset contains the previous password hash, and restoring one would bring that credential back. Backups also hold the rest of the user table, so they need the same access controls as the live database. Restrict who can read backup archives, record which backup is the post-reset baseline, and delete or re-encrypt older copies according to your retention policy.
Secret key kept outside data
The secret key used by the instance must live outside the data directory, in a secrets store or a protected environment file, and must be backed up separately. If it sits inside the data directory, a restore or copy of that directory carries the key with it, and a restored instance may not be able to decrypt or verify what it needs. Confirm the key location, document how it is restored, and keep it out of the reset procedure's output.
Preventing admin lockouts when SSO is the login method
The most reliable way to avoid a lost-password emergency in an SSO deployment is to make sure a second, separately tested admin path exists before anything goes wrong. Open WebUI documents single sign-on through OIDC and LDAP, SCIM 2.0 user and group provisioning, role-based access control with groups, API keys and authenticator-app MFA. Those features are useful, but they also mean the only admin may sign in through an identity provider that is down, misconfigured, or has changed its group mappings. Keep at least one break-glass admin account whose sign-in path does not depend on the identity provider, and test it on a schedule. Record where that account's credentials are stored, who can retrieve them, and the exact steps to use them, so the test is repeatable by someone other than the person who built the setup.
Next, document how admin roles are assigned. If SCIM provisioning or group mapping sets roles, a directory change or a sync run can remove admin rights from an account that was never meant to lose them. Write down which directory group maps to the Open WebUI admin role, who owns that group, and what happens to a user who leaves it. Then confirm, for your Open WebUI release and your identity provider, which accounts remain able to sign in when the identity provider is unavailable, and whether local password sign-in is still enabled for them. Treat these answers as configuration to verify, not as defaults to assume, because the behavior of SSO, SCIM and group settings can change between releases.
Finally, review MFA recovery for admin accounts. If an admin's authenticator app is lost and the identity provider enforces MFA, the recovery path may run through the same system that is locked. Decide who can reset admin MFA, how that request is verified, and where it is logged. Confirm with the vendor documentation for your release whether Open WebUI's authenticator-app MFA can be reset from the admin side and what the break-glass account needs to bypass it. Rehearse one full recovery in a non-production instance before you rely on it.
What to confirm before you touch the database
A password reset writes directly to the Open WebUI database, so the change is only as safe as the environment around it. Work through these six checks with the people who run the platform before anyone opens a database shell.
Release and database engine
Confirm which Open WebUI release is running and whether it uses SQLite or PostgreSQL. SQLite is acceptable for a single replica only when the database file sits on locally attached SSD or NVMe storage, not network storage. Multi-instance deployments use PostgreSQL, so the reset procedure must target that engine. Also confirm the release tag, since the stored hash format the procedure relies on should be checked against that version's documentation.
Scaling docsReplica, Redis and shared storage
Ask whether the deployment runs more than one replica. If it does, confirm that Redis holds shared session state and that uploads and knowledge are on shared storage. Without Redis, signing out does not revoke tokens, and a password change alone will not end sessions that are already active. Plan to restart replicas or clear sessions as part of the reset, and check that every replica reads the same database.
- Default token lifetime
- 4 weeks
Recent verified backup
Confirm that a backup taken before the change exists and that someone has restored it successfully at least once. For SQLite, that means the data directory. For PostgreSQL, it means a logical or physical dump of the Open WebUI database. Also confirm that the secret key is stored outside the data directory, because a restored database without the matching key may not behave as expected.
Database credentials and approval
Identify who holds the database credentials and who must approve a direct write to the users table. Confirm whether the change will go through a change ticket, a second reviewer, or an emergency access process. Record the account used, the time window and the person who will verify the new login afterward, so the action is traceable in database and audit logs.
Identity provider and SCIM sync
Check whether SSO through OIDC or LDAP, or SCIM 2.0 provisioning, controls the admin's role. If the identity provider pushes role or group data on a schedule, a manual role change in the database can be overwritten within the next sync. Ask the identity team which source of truth owns the role, and whether a second admin signs in through SSO so the reset does not become the only recovery path.
Features docsHash format for this release
Confirm that the stored password hash format in your release matches the bcrypt procedure you plan to follow, and that the field name and user identifier in your schema are the ones the release uses. Test the procedure on a copy of the database first. A hash written in the wrong format or to the wrong row can leave the account unusable, so verify the login on the copy before applying the change to production.
How much effort does an admin password reset take and what does it need from us?
How long does an Open WebUI admin password reset take?
The reset itself is a short database change, so the elapsed time is driven by access and preparation rather than by the hash update. No duration is published for this work, so ask for an estimate that lists the steps you expect to be covered. The main drivers are how quickly you can reach the database, whether a verified backup exists before the change, how many replicas share that database, and whether admin sign-in runs through SSO. A single-instance install with a tested runbook moves quickly. A multi-replica or SSO-only setup adds verification steps that take longer.
What does a reset need from our team before work starts?
Plan to provide the following before anyone touches the system:
- Read or write access to the database that holds Open WebUI users, either PostgreSQL or the SQLite file on the host or container
- A change window agreed with the people who own the service
- A named approver who signs off the change and the rollback plan
- The deployment files, including the Docker Compose file or Helm values, and the secret key location
- A named admin owner who will hold the recovered account afterward
Missing any of these is the most common reason a recovery stalls.
Can our internal team reset the admin password without outside help?
Yes, for a simple single-instance installation with a tested runbook and a verified backup. The procedure writes a new bcrypt hash into the user record, so the person doing it needs database access and enough care to target the correct account. Outside help becomes more valuable when several replicas share state, when the database is not local, or when every admin signs in through an identity provider and no local password path has been tested. In those cases, an error can lock out more people, so review the procedure in a non-production copy first.
Does SSO change how hard an admin lockout is to recover?
It can. If every administrator signs in through OIDC or LDAP, a local password may never have been set, or the account that holds it may no longer be an admin. Confirm before you need it whether a break-glass local admin exists, whether its credentials are stored outside the platform, and whether a reset path has been tested. Recovery then depends on the identity provider team as well as the database owner, so add them to the change plan.
What does a fixed-scope engagement for this recovery cover?
DeployOpen works from a written scope that is agreed before work starts. For this topic, a scope typically lists the deployment type, the database and replicas involved, the account to recover, the verification steps, and the evidence you receive, such as a change record and a confirmed login. Ask the quote to state what is excluded, for example root cause analysis of the lockout or changes to identity provider configuration. Deliverables and timelines are fixed in that document.
What cost components should we ask about in a quote?
Ask the quote to separate the one-time recovery work from anything recurring. One-time items include preparation, the change itself, verification and the written record. Ask whether database access setup, a restore test or runbook writing is included or priced separately. Recurring items usually include periodic admin account review, break-glass login testing and upgrade work tied to new Open WebUI releases. DeployOpen does not publish prices, so the quote is the source of truth for both lists.
What work recurs after a reset, and how often should it happen?
Once the account is recovered, the recurring work protects against the next lockout. It includes reviewing who holds admin rights, testing the break-glass local admin path on a schedule, confirming that backups can be restored, and applying upgrades. Upgrades follow the project's release history, including v0.12.3 published on October 16, 2026. Agree on a review cadence with your security team and record each test so that the next recovery starts from a known state.
How DeployOpen works on this
DeployOpen treats an admin password reset as part of a wider access plan, not a one-off database edit. We scope the recovery path for your installation, make sure at least one working admin remains reachable, and document how the team regains access if an identity provider or SSO setting fails.
How we scope
- Confirm how your Open WebUI is installed (Docker, Compose, Kubernetes or pip) and where its data directory or PostgreSQL database lives.
- Identify which admin accounts sign in with a local password and which depend on SSO, OIDC or LDAP.
- Agree in writing which recovery procedures are in scope, with fixed deliverables and a timeline before work starts.
How we build
- Build a documented break-glass admin path that is tested in a non-production copy before anyone touches production.
- Set up the access controls around the recovery path, including who may run database commands and where the audit trail is kept.
- Check that the secret key and database backups needed for recovery are stored outside the data directory and can be restored.
How we hand over
- Deliver a runbook with exact steps for Docker, Compose, Kubernetes and local installs, covering the procedures your team uses.
- Walk your operators through a supervised recovery drill so they have practiced the steps once before they need them.
- Record each local admin account, its owner and the approval path for using the break-glass credential.
How we support
- Offer ongoing support and upgrade work as a retainer, so the recovery runbook is updated when Open WebUI or your identity setup changes.
- Retest the recovery path after significant configuration changes, such as moving authentication to a new identity provider.
- Confirm with your team which support hours, response expectations and escalation paths the retainer covers before signing.

