Edit configuration.yaml with Hass.io CLI

Are you ssh’d into hassio, or are you accessing it via a keyboard/monitor plugged into your raspberry pi?

Googling this shows there are helpful links out there. For example:

1 Like

I’m ssh’d into Hassio, thanks!

Then the file (and all your config files) are in the



Hi, thanks for the reply! I tried that and it wasn’t working. I’ve decided to start over since I was already planning to upgrade to a bigger SD card. The first thing I’m going to do this time is installing samba and the ssh add-on. Thanks!

1 Like

I thought you said you had the ssh addon installed this time (see you last response to me).

I used the debugging feature. Thanks!

I just wanted to put this here for those that run into the same problem. I mistakenly had a tab in my configuration.yaml and restarted without checking first. I also didn’t have access to SSH (I tried installing from CLI, but couldn’t get the configuration edited correctly).

So, here’s what I did:

  1. login to get out of hassio cli and into bash
  2. docker ps to get a list of containers
  3. note the first 3 characters or so of the container for homeassistant - for me it was 51a
  4. docker exec -it 51a /bin/bash
  5. ls to make sure configuration.yaml is there
  6. vi configuration.yaml to edit the file
  7. edit your mistake
  8. esc + :wq to save and exit
  9. exit then login to get back to hassio CLI
  10. homeassistant check to make sure the conf is right this time
  11. homeassistant restart

Thank you so much John! That worked perfect.

I’m new to HA and didn’t realise a simple error in my config file could mess it all up to the point i had no web interface.


I’m struggling to access the host system. This is what I see:

login as: root
Authenticating with public key "xxxxxxxxxxxx"

  _    _                 _
 | |  | |               (_)
 | |__| | __ _ ___ ___   _  ___
 |  __  |/ _` / __/ __| | |/ _ \
 | |  | | (_| \__ \__ \_| | (_) |
 |_|  |_|\__,_|___/___(_)_|\___/

Our Cli:
$ hassio help


I’ve tried typing login but any password and user I try is rejected. Can anyone help please?



You are already logged in.

Thanks! This was very helpfull while fixing my confguration without ssh access.

These directions definitely saved me from having to start again from scratch!

Nice write up and thanks for posting it!

This worked perfectly for me to get my Home Assistant instance working again! Thank you for the steps!

Thanks so much for sharing this!!!

My home assistant just died after a windows update (I run HASSIO via virtualbox). Somehow the configuration.yaml file was completely corrupted and so wouldn’t boot. This allowed me to delete the yaml file and replace it with a backup i keep.


Thank you for this. You are a life saver. I had a very worrisome couple of hours before I found this post and now I have my front-end back again! Definitely bookmarking this one.

No problem everyone! Glad I could help!

Hello there.
I installed Home Assistant on my Asustor Nas using Docker-ce. I can see the configuration.yaml file in the Home Assistant folder in the Docker folder in Nas.
But when I open the Home assistant application and write config / configuratin.yaml in the address line, the script does not open.
How can I open this in the application?

Thank you for your help.

You can’t edit configuration.yaml by going to http://xxx.xxx.xxx.xxx:8123/config/configuration.yaml

You have to check where you mapped /config when creating the docker container.

1 Like

Thank you very much for your reply.

But I couldn’t find how to open the file. With the pictures I show you the location of the file in the NAS.

Thank you in advance for your help.