Changing the .storage directory on Docker install

Tags: #<Tag:0x00007f7388dcc190> #<Tag:0x00007f7388dcc028>

I run HA under Docker and I’d like to mount the .storage directory from a different source location (backed up) than the config directory (VC). How can I configure Docker HA to look for the .storage directory in a different location?

I think I’ve figured out how to configure the sqllite directory to be in a different directory, but not the log file yet; any pointers on that also appreciated.

Not meaning to come shouting the odds, but the method of just lumping config, data and logging under a single directory by default does seem a bit insane to me.

-v /config/.storage:/YourConfigFolder/.storage

I ask about changing the .storeage directory location in Home Assistant and you show me the option to mount a path in Docker. What’s the relevance?

Sorry. I only concentrate on how to load from different location in docker and not relevant the location recognized by HA.

Since this is docker, does it matter if HA is looking at /config/.storage or /backup/.storage? in the end your goal is to separate the data types and my preference is to use docker paths vs change the normal path structure of application since it is easier to maintain documented method of app and standardize docker folder naming and structuring.

Long story short…I thought you just didn’t know how docker work and provided easiest method to accomplish what I thought was your goal :slight_smile:

Ok, no problem. Yes, I’ve been using Docker professionally for the past 5 years, so know how to mount a directory :grinning:

The problem here is is that one directory is inside the the other. If I mounted the config directory from one host directory, and .storage from anther host directory, stuff written to .storage would just end up inside config again on the host.

I think the lack of replies here means that it’s not easily possible and it’s a real poxy design choice imho.

Nope.

Will work just fine.
Honestly I was not sure so I test with my HA just to verify and was able to bind mount /config/.storage into a separate host folder than /config.