Access to Home Assistant is secured by our authentication system. Each member of your household will get their own user account to log in and access Home Assistant.
Home Assistant contains two different user types: the owner user account and normal users. The owner user account is created when you start Home Assistant for the first time. This account has some special privileges compared to the other users of the system:
- Manage users
- Configure integrations and other settings (soon)
- Configure Hass.io (soon)
When a user wants to use Home Assistant, they have to log in. When navigating to the frontend without authentication, the user is asked for a login. The login page will always show you the website that you’re logging in to.
When logging in, make sure that the URL in the URL bar is showing the address of your Home Assistant instance.
Once you’re logged in, you can access the profile page by clicking on the badge next to the Home Assistant title in the sidebar. Here you can change your preferred language or change your password. You can also log out.
As a user, you can setup multi-factor authentication with time-based one-time passwords. This is an extra challenge that you have to solve after you finish your login. You will be able to set up these challenges from the profile page once you’re logged in.
Under the new authentication system you’ll see the following warning logged when the legacy API password is supplied, but not configured in Home Assistant:
WARNING (MainThread) [homeassistant.components.http.auth] You need to use a bearer token to access /blah/blah from 192.0.2.4
If you see this, you need to add an
api_password to your
If instead, you see the following, then this is a message for component developers, to tell them that they need to update how they authenticate to Home Assistant. As an end user you don’t need to do anything:
INFO (MainThread) [homeassistant.components.http.auth] You need to use a bearer token to access /blah/blah from 192.0.2.4
While you should hopefully be storing your passwords in a password manager, if you lose the password associated with the owner account the only way to resolve this is to delete all the authentication data. You do this by shutting down Home Assistant and deleting the following files from the
.storage/ folder in your configuration folder:
When you start Home Assistant next you’ll be required to set up authentication again.
You have to use a domain name, not IP address to remote access Home Assistant; otherwise you will get Error: invalid client id or redirect url error on the login form. However, you can use the IP address to access Home Assistant in your home network.
It because we only allow using IP address as client ID when your IP address is one of internal network address (e.g., 192.168.0.1) or loopback address (e.g., 127.0.0.1).
If you don’t have a valid domain name for your Home Assistant instance, you can modify the
hosts file on your computer to fake one. For example, if you are on Windows, edit
C:\Windows\System32\Drivers\etc\hosts file with administrator privilege, add following entry.
188.8.131.52 with your Home Assistant’s public IP address)
It will allow you to open Home Assistant instance by access
Some advert blocking software, such as Wipr, also blocks web sockets. If you’re stuck on the Loading data screen, try disabling your ad blocker.
If you were using the authentication system before 0.77, you’ll likely have
auth_providers: defined. You’ll need to remove these and let Home Assistant handle it automatically.