Reusing HA secrets.yaml

Quick question. I already have a secrets.yaml setup and wanted to use the same file for my appdeamon secrets, I found a vague reference in the docs about using secrets: /some/path at the top level of the config. I’ve added secrets: /home/hass/.homeassistant to my appdaemon.yaml since that’s where my install is.
When I try to start appdaemon I get an error that it couldn’t find the file:

pi@raspberrypi:~ $ appdaemon -c /home/hass/.homeassistant/conf
ERROR Error loading secrets file: /home/hass/.homeassistant

I’m using the same path for my dashboard dir (dashboard_dir: /home/hass/.homeassistant/dashboards) and that’s working so I know the path is correct!

appdaemon needs filerights in the dir where the secrets.yaml is.
for your dashboard dir you probably did set the filerights, but is the user that you use to start appdaemon, also allowed to read in the dir and to read the file?

Looks like you gave it a directory instead of the full path to the file itself.


Ah yes, added the entire path including the filename and now it works! Thanks @aimc, might need to update the docs with that! :smiley:

1 Like

i dont use it but because off this:

secrets: /some/path

in the docs i didnt expect that the file needed to be there.
the text below it however does say that it needs to be a file.
so i think that changing the line to

secrets: /some/path/to/secrets.yaml

would make that others dont make the same mistake.

1 Like

Yup, that’s exactly the misstake I made, I thought it just needed a folderpath and would pick the secrets.yaml by itself!