So I wanted to take a look at the raw configuration file of my addons but I can’t seem to find where those are located (and I’m feeling pretty silly as I’m sure this is an easy answer).
I’m running the HAOS VM image and I’ve installed the SSH addon. I connect to ssh using the hostname of my HAOS VM and I can login no problem. In my home directory I see an “addons” directory but it appears to be empty.
I can see the HA configuration if I switch to the “config” directory but I can’t seem to find the addons. What am I missing here?
The JSON file that reflects what you’ve entered in the UI config tab isn’t accessible from SSH. But it’s really just exactly what you entered, converted to JSON, so there’s no advantage to seeing the “raw” file.
The “addons” directory is for “local addons” that you install yourself and not from the addon store. It’s rare that you’ll need to put anything there.
That’s only partially correct. The application and any supporting script and infrastructure are in the container, but any persistent data is stored outside the container and those files/directories are mounted into the container. That persistent data isn’t directly accessible through SSH, and you’d either need to shell into the container or go in through the console to get to that data.
Docker containers are intended to be disposable and delete/recreated at will, so storing any config info that’s expected to be modified and retained is a bad idea.
but if you modify the config of an addon which is currently stopped, you save this config and you restart HA, the configuration is memorized even though it has not yet been injected into the container since the addon is stopped, the config must therefore be saved somewhere other than in the container
Hi, I’d like to bump this thread. I’m using ansible to manage a number of Home Assistant installations and need to edit the config for an addon from the command-line, so using the ha binary or editing a file directly.
I’ve managed to install the addon using ha, but can’t find out where I can edit the configuration other then in the GUI. The addon hasn’t been started yet, and I can edit the options in the GUI and they’re saved (so it’s definitely stored outside of the container), but I can’t find a file or ha option that lets me edit the options.
Thanks for the quick reply @boheme61 Unfortunately I don’t quite understand what you mean.
My Home Assistant is running the HA OS on a raspberry pi and I login using the community ssh addon. There’s nothing in /mnt, although I do have a /data folder. It contains an options.json file that seems to contain the options for the ssh addon (e.g. the authorized_keys are stored there), but there are no other options for any other addons.
There are also /addons, /addon_config, /share and /homeassistant directories that are directly mounted, but none of those have the options for the addon I’m working with.
If it’s helpful to understand where I’m at, I installed the addon using the following commands:
ha store add https://github.com/mattlongman/hassio-access-point
ha addons install 30e576d0_hassio-access-point
I don’t need to connect a keyboard as I can ssh in using the ssh addon.
I can’t access the container for the addon as it hasn’t been started yet so it’s not visible when I run docker ps.
However, the addon page in the web interface shows the amended configuration that I updated, so that tells me home assistant is storing that configuration somewhere and that I should be able to change it.
-s is --silent so it suppresses the usual output, but the -S is --show-error so you’re not left completely in the dark if it fails.
-L is --location so it follows redirects