Location automations.yaml in docker

So I now have a working Homeassistant in Docker under Ubuntu 18.04. This was a reinstallation and I bet I screwed up the directory to give HA to store it’s files.

I can’t get automations to work. I even just put the word test in automations.yaml and configuration checkers thinks everything is OK. It’ wont let me edit any automations.

I am assuming it is pointing to the wrong place for this. How do I check where HomeAssistant is looking for it’s configuration files.

Is it easier to just reinstall in Docker?

What will that help? What would you do differently if you created a new docker run command?

In cases like this it’s almost never necessary to “reinstall” HA/Hassio/docker container.

To start with helping you to troubleshoot post your docker run command.

Where were your configuration files located before you moved to docker? Did you move them somewhere else?

Do all of your other configuration’s seem to be working OK? groups, etc?

They were on a raspberry pi. I moved them to my homedirectory/homeassistant.

I haven’t set any other configurations, but no, it is not reading configuration.yaml, I put test as first line in that and it still think configuration valid.

I start homeassistant with
sudo docker container start home-assistant

I assume you installed Docker correctly?

Normally when you create and/or run a container in Docker you have a command that tells Docker lots of stuff about the container you want to run like where the config files are stored, network ports to use, etc.

It should look similar to this:

sudo docker run -d --name="home-assistant" --restart=unless-stopped -v /home/finity/docker/hass-config:/config -v /etc/localtime:/etc/localtime:ro -v /home/finity/docker/sshkey/.ssh:/root/.ssh --device /dev/zigbee:/dev/zigbee --device /dev/ttyUSB-ZStick-5G:/dev/ttyUSB-ZStick-5G --net=host homeassistant/home-assistant

What was your Docker run command?

That is the problem. I think I did but bash history is gone. Hence my question is there a was to see the where HA thinks the config is stored?

And I need some Docker 101 instructions. Assuming I ran that command you gave with my homedirectory. How should I be stopping and starting HomeAssistant?
sudo docker container start home-assistant?

the run command is for when I set it up originally correct?

I don’t stop/start containers from the command line (I use Portainer) but google says:

sudo docker start container_name

you need to know the name of the container that you created by the create/run command.

you can find that by running:

docker ps -a

again, Portainer can tell you that information but I’m not sure how to find that in the command line.

yes. And unless you use some other means of re-creating the container (docker-compose, portainer, etc) then you will need to know that command every time you want to recreate the container for upgrades etc.

I think the best bet at this point would be to remove the homeassistant container that you created and re-create one from scratch with the proper run command and using the correct bound volumes to tell it where to find your config files.

You can do a docker inspect <nameofcontainer>

yep, there they are.


Surely the simple answer is that the OP must have edited configuration.yaml, and automations.yaml should be in the same directory.

The config files were in a different directory, instead of home directory of mythuser there were in mythuserr.\

I’m sure a typo when initially ran the run docker command. I backed up the files in mythuser home directory, removed the container, reran the run command, and HA sees the config file now.

The config file was not being read, at least not in the directory I was editing it.

That’s great about the docker inspect command. I just ran it and it showed the directory. Given that it was not in correct spot anyway, I guess there is no way to change that location in docker somehow. So reinstalling was the only answer.

You’re not “installing/uninstalling/reinstalling” anything. You’re just running the container.