Access and Maintenance

How do I reset my Home Assistant password?

Home Assistant has no email reset. Change the password from your profile if you are logged in, or reset it from the console or CLI for your install type.

On this page
  1. Quick answer
  2. If you are still logged in
  3. Check your username first
  4. Home Assistant OS, Green, or Yellow
  5. Home Assistant Container (Docker)
  6. Home Assistant Core (virtual environment)
  7. If the new password is not accepted
  8. Lost MFA codes or a Nabu Casa password
  9. What not to do
  10. After you regain access

Quick answer

Home Assistant has no email reset and no “forgot password” link. If you can still log in, change the password from your profile. If you cannot log in, reset it from the device console or the command line, using the command for your install type below.

If you are still logged in

  • Change your own password: select your profile at the bottom left, open Security, and select Change password.
  • Reset someone else’s password (admins): go to Settings > People, open the Users tab, pick the user, and change the password. The Users tab appears when Advanced mode is turned on in your profile.

Check your username first

The command-line reset needs the exact username. On Home Assistant OS, list the accounts from the console:

auth list

Usernames are lowercase. Log in with the username, not the display name you chose.

Home Assistant OS, Green, or Yellow

You need local console access. Any of these works:

  • A monitor and keyboard connected to the device
  • The console of a virtual machine, if you run Home Assistant OS in a VM
  • The SSH app, if you are still logged in to Home Assistant from another device

At the ha > prompt, run the command below (in the SSH app, put ha in front of it):

auth reset --username <user> --password <new-password>

If special characters cause trouble at the console, use a simple temporary password. Then change it to a strong one under Security in your profile.

Home Assistant Container (Docker)

If your container is named homeassistant, run this from the host:

docker exec -it homeassistant hass --script auth --config /config change_password <user> <new-password>

To list the usernames first:

docker exec -it homeassistant hass --script auth --config /config list

Then log in with the new password.

Home Assistant Core (virtual environment)

Activate the virtual environment, then run the same command, pointing --config at your configuration folder:

hass --script auth --config <config-directory> change_password <user> <new-password>

If the new password is not accepted

Restart Home Assistant so it reloads its user data, then try again. Check the spelling of the username as well.

Lost MFA codes or a Nabu Casa password

These are separate problems from a lost password:

  • Lost MFA codes. Recovering MFA can mean editing files or using another admin account. If you have no other admin, read the official lockout guide before you change any files.
  • Nabu Casa account password. This is your Home Assistant Cloud login, not your Home Assistant login. Reset it on the Nabu Casa website.

What not to do

  • Do not delete the .storage auth files. They hold your users and tokens. Deleting them can break every login and integration.
  • Do not treat trusted-networks login as a reset. It lets listed addresses sign in without a password, but it does not set a new password.
  • Use a backup only as a last resort. A restore works only if you have a backup from before the lockout, and you lose any changes made since then. See how to back up and restore Home Assistant.

After you regain access

  • Set a strong, unique password.
  • Turn on MFA (TOTP) under Profile > Security.
  • Revoke any long-lived access tokens you do not recognise, under Profile > Security.

For the basics of usernames and logins, see how to access Home Assistant.

The complete guide to access and maintenance

How to Access Home Assistant: URLs, Default Login, Tokens and SSO
Read the guide

Keep exploring

Guides from other topics

All topics →