Restore configuration.yaml after miss config

Hi. I have raspberry pi 4 and installed Home Assistant. It worked fine until I put some wrong settings in configuration.yaml in “http” section when tried setup duckDNS and then I can’t open web UI. How I can restore it configuration.yaml now?

  1. I have checked the microSD where HA installed but there are no configuration.yaml
  2. I can attach keyboard and monitor to raspberry pi, but I dont know what to do next.


It depends on how you installed Home Assistant.

If you used the HassIO install method hopefully you followed the recommendation and installed at least one of the Samba or SSH add-ons.

It’s there, but if you’re using Windows, Windows doesn’t know how to read Linux partitions by default. You will need an app to do that.

You would have to login and edit the appropriate file.

Installed exectly as manual said

  • Download and extract the HassOS image for [your device]
  • Download balenaEtcher to write the image to an SD card

I didnt install Samba or SSH ;(

Is it passible get access to system files when you have access to raspberry pi with keyboard?

Screen looks like this

and i can type some commands there.

Yes. This has been covered numerous times on the forums (should probably be added to the documentation that you NEED a way to access these files).

login and then you can use the command line to edit the file.

Can you please show me discussion about it? How and when config files can be found.

Sorry, I am not going to Google that for you. I have seen it mentioned numerous times.

If I recall correctly, the files are in /data somewhere.

ok. I found the post and use the solution Edit configuration.yaml with CLI


  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

You should have been able to edit the data directly, with no need to enter the running docker container.

Hm. You right. It is just in /config folder.


This is a mapped directory INSIDE the containers. I believe on the host it’s under /data

omg - you are a life saver! I had the same issue foobaring my Duck DNS configuration and needing to take out the SSL bit in configuration.yaml

just for the record, “homeassistant” is apparently depreciated and it’s now “core restart”

1 Like

A post was split to a new topic: Problem converting F to C