I installed HA in Docker (No OS, No supervizor). How do I access configuration.yaml?

Hi folks!

I would like to have OpenMediaVault with Docker and Portainer installed and run multiple containers. For this reason, I decided to also install HA in Docker.

I found this tut on how to run HA in Docker and without addons.

But I have no clue on how to access files in HA. For starters I wanted to access configuration.yaml.
Any suggestions? Thank you!

You need to create either a samba share to you HA config directory or (what I do) use winscp and ssh to connect to the directory and edit the files with a basic text editor. I use Notepad++.

2 Likes

I run HA on Docker using Portainer on a Ubuntu Linux host. My configuration.yaml and other HA files/folders are on a persistent docker volume that is physcally located on a Synology NAS which is shared using SMB. I use VSCodium to edit my HA configuration files.
VSCodium can access the HA shared configuration folder via SMB which allows the editing of files. Here’s a screenshot:

3 Likes

If you are comfortable with the command line, then on your host OS run the command docker exec -it homeassistant bash. It will connect you to a terminal session in the docker container. make sure to replace homeassistant with the name of your container.

If you aren’t sure what the name of the container is then run docker container ls

:information_source: note: depending on how you set things up you might have to run those commands as sudo

Once the session is connected you can do whatever you want. Find the configuration.yaml and edit using nano/vi/etc…

1 Like

Logically my config folder is outside of the container and via the system OS and Samba shared, I access my files through windows/laptop, there I can use Notepad++ for instance

2 Likes

Thank you, guys!

I took your advice so that I would better understand what is going on. In the end I installed HA config files in /opt/homeassistant/config. And shared the /opt folder via OMV via SMB

Hmm. Still not working. I can access the folder, but I cannot edit the files there incl. configuration.yaml.

Trying to figure out how to setup access options in order to be able to do that. For now I have a user created with some privileges and the /opt folder is shared via SMB as guest only. And I can access that folder via SMB from Windows but, like I said, I can not edit the files.

Any suggestions are truly appreciated.

I have no clue what/how you setup but…my etc/samba/smb.conf contains the following three lines at the end

[docker]
path = /here_the_whole_path_to_the_folder 
valid users = myself,admin
read only = no

then from windows I can login with ‘myself’ and the pwd that goes with it