Acces configuration.yaml File on docker

Hello, I have a problem I’m trying to solve all day. I have Homeassistant installed on docker on a Raspberry PI and can’t access the configuration.yaml file. When I look in my docker folder I just see 2 cryptic files. It tried to acces it with docker-compose but that also didnt work. Does somebody have a solution, that hasn’t been mentioned before? Thank you in advance.

You mapped /config with either the docker run command, or your compose file. What did you map?

I think its the docker run command


What was that command? We can’t help you if you don’t tell us things :wink:

Ok, sorry for that. I’m new here. I tried to install docker compose, but it didn’t work. I used the standard settings. To clarify I can’t find any .yaml file. Since you listed two options adn docker compose didn’t work I would assume its the docker run comman. If I missunderstood something (I certanly did) please correct me. Thanks

I looked somethink up, I don’t know if it’s the right thing, but in the terminal it says:

 "Mounts": [],

There aren’t any.

See the docs for what you should be doing.

I’d 100% recommend compose files over the command line.

Hey, I looked into it. I looked in the docs, and I found This
admin@JannesPi:~ $ docker run -d \ --name homeassistant \ --restart=unless-stopped \ --privileged \ -e TZ=Europe/Berlinadmin@JannesPi:
This just pops out this error message:

"docker run" requires at least 1 argument.
See 'docker run --help'.

Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Create and run a new container from an image

I also have a general question, what even is the /config file, where should I paste it and why do I need it. I’ve also asked a Ki, I google, etc.
Sorry if I am a bit dumb, but thanks anyway.

Did you look at the link?

Your run command should have more:

docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -v /PATH_TO_YOUR_CONFIG:/config \
  --network=host \


Yeah sorry, my fault.
I forgot to paste the changed version here, but I’ve ran it in the terminal.
Here’s the code that i ran:

docker run -d \
  --name homeassistant \
  --privileged \
  --restart=unless-stopped \
  -e TZ=Europe/Berlin \
  -v /usr/config:/config \
  --network=host \

/config is a folder, not a file. This folder is where HA stores all of it’s configuration and data. It will contain a number of folders and files, including configuration.yaml
Using the command you posted above, it will be in the folder /usr/config on your host… Assuming it (Docker) is allowed to write to that location.
You can try here for a working (but not the most basic) Docker Compose file…

That’s a very strange choice of /usr/config. You shouldn’t pick locations under /etc/, /usr, or /var (or /tmp). Create your own folder (for example, I use /data) or use something under /home.

This will create a new homeassistant installation, so I need to remove the old on, right?
It says the container name is already in use and the docks say it will create a new one…

You can rename the running instance (named homeassistant) and stop it. Delete it later when the new instance is in place and running.

sudo docker container rename homeassistant homeassistant_old
sudo docker container stop  homeassistant_old

1 Like

Thanks that all works now! :grinning: