reset home assistant password

"Reset Home Assistant Password: Step-by-Step Guide"

By Mark Taylor
AD

Forgotten your Home Assistant password? Don't worry, resetting it is a straightforward process. This guide will walk you through the steps to reset your Home Assistant password, ensuring your system remains secure and you regain access to your smart home hub.

Understanding the Reset Process

Resetting your Home Assistant password involves accessing the configuration.yaml file, which is where your password is stored in an encrypted format. By changing the password in this file, you'll effectively reset your password. Here's a step-by-step guide to help you through the process.

Before You Start

Before proceeding, ensure you have the following:

AD
My 8 Favorite Home Assistant Integrations
My 8 Favorite Home Assistant Integrations
Changing Home Assistant to use MariaDB
Changing Home Assistant to use MariaDB
Smart Refrigerator w/ESP8266
Smart Refrigerator w/ESP8266
  • Access to your Home Assistant server via SSH or local access.
  • Basic understanding of file editing commands (like nano, vim, or pico).
  • A backup of your configuration.yaml file, just in case.

Accessing the Configuration File

First, you need to access the configuration.yaml file. If you're using SSH, connect to your Home Assistant server. Then, navigate to the Home Assistant configuration directory:

cd ~/.homeassistant

5 Home Assistant Community Store (HACS) Integrations You Should Try
5 Home Assistant Community Store (HACS) Integrations You Should Try
My Smart Home by Home Assistant: 3 Years Later - HomeTechHacker
My Smart Home by Home Assistant: 3 Years Later - HomeTechHacker
Home Assistant Beginner Cheat Sheet: Key Terms Explained
Home Assistant Beginner Cheat Sheet: Key Terms Explained

Using the nano Text Editor

To open the configuration.yaml file, use the nano text editor:

nano configuration.yaml

AD

Using the vim Text Editor

If you prefer vim, use the following command:

5 Home Assistant features you’re not using (but should be)
5 Home Assistant features you’re not using (but should be)
Dusun Home Assistant IoT Gateway Review - HomeTechHacker
Dusun Home Assistant IoT Gateway Review - HomeTechHacker
Setting up HomeKit on Home Assistant
Setting up HomeKit on Home Assistant
Pinterest Password Reset Page – What You Need to Know
Pinterest Password Reset Page – What You Need to Know
The Evolution Of My Home Assistant Setup - HomeTechHacker
The Evolution Of My Home Assistant Setup - HomeTechHacker
Getting Started with Home Assistant on Raspberry Pi | Random Nerd Tutorials
Getting Started with Home Assistant on Raspberry Pi | Random Nerd Tutorials

vim configuration.yaml

Resetting Your Password

Once you've opened the configuration.yaml file, look for the default_config: section. Within this section, you'll find the password: line. Here's what it might look like:

AD

default_config:

What is Home Assistant? - Dirty Optics
What is Home Assistant? - Dirty Optics
My Home Assistant (Automation System)!
My Home Assistant (Automation System)!
Getting started with Home Assistant & Raspberry Pi: Control and Automate Smart Devices
Getting started with Home Assistant & Raspberry Pi: Control and Automate Smart Devices
The Home Assistant resources everyone should know about (even if you're just getting started)
The Home Assistant resources everyone should know about (even if you're just getting started)
A DIY AI Voice Assistant for Home Assistant
A DIY AI Voice Assistant for Home Assistant
Setting up an AI Image Analyzer on Home Assistant
Setting up an AI Image Analyzer on Home Assistant
Better Presence Detection in Home Assistant — Home Automation Guy
Better Presence Detection in Home Assistant — Home Automation Guy
someone is holding up their tablet with the screen displaying an alarm clock and other electronic devices
someone is holding up their tablet with the screen displaying an alarm clock and other electronic devices
Animate Home Assistant Cards | 25+ New Animations
Animate Home Assistant Cards | 25+ New Animations
How to Install Home Assistant OS on UCTRONICS RPI Rack Pro's OLED Display
How to Install Home Assistant OS on UCTRONICS RPI Rack Pro's OLED Display
Home Assistant : présentation de l'interface (2023)
Home Assistant : présentation de l'interface (2023)
How to Set Up Grafana on Home Assistant
How to Set Up Grafana on Home Assistant
Using the IKEA Trådfri Remote With Home Assistant - HomeTechHacker
Using the IKEA Trådfri Remote With Home Assistant - HomeTechHacker
Getting Started With Home Assistant In 2025: The Ultimate Guide
Getting Started With Home Assistant In 2025: The Ultimate Guide

password: !secret my_password

To reset your password, you'll need to change the !secret my_password line to use a new secret. Here's how:

AD

Creating a New Secret

First, create a new secret in your secrets.yaml file. If you don't have one, create it in the same directory as your configuration.yaml file:

nano secrets.yaml

Then, add a new line with your new password, like this:

my_new_password: "your_new_password_here"

Updating the Configuration File

Now, go back to your configuration.yaml file and update the password line to use your new secret:

default_config:

password: !secret my_new_password

Saving and Restarting Home Assistant

After updating the password, save and close the file. Then, restart Home Assistant for the changes to take effect:

systemctl restart home-assistant

Once Home Assistant has restarted, you can log in with your new password. If you encounter any issues, double-check that you've saved your changes and that your new password is correctly formatted in the secrets.yaml file.

AD