VENV vs Docker - Opinion Question

I’ve been running HA in a VENV for close to two years now. I’ve also recently played with docker install on a test system. When I first started I did find myself digging into and making minor changes to some of the HA core files in my venv, but honestly I have not done that in quite a while.

So, I recently got a good deal on an NUC. So, i’m planning a fresh ubuntu install. I’m leaning heavily towards a docker install for HA, zwave, MQTT, etc. But I also dont want to paint myself in a corner. The NUC will only be used for HA.

Is there any reason to go back to a VENV? What would I be missing? Performance?

You can still make changes to Home Assistant’s core files within a docker container. HOWEVER, a container is meant to be disposable so when you perform an upgrade, the entire container is replaced with a new one (and your core file modifications are lost).

So if you frequently rely on modified core files, switching from venv to docker will be less convenient because you will need to re-modify the core files after each upgrade.

Personally, I found it more convenient to manage a docker-based system. For example, I don’t have to upgrade python because the container already has it. However, it you have been managing a venv-based installation for almost two years, I imagine you’re quite comfortable with the process.

1 Like

Thanks that’s great info. I am pretty comfortable in the venv, but when I played with a docker container in my test environment, i was impressed with the simplicity of it. Then when I start thinking about needing docker anyway for the new OZWAVe, it just seemed to make even more sense to go docker all the way.

My NUC is a few year old I3 with 8gb ram, and a decent sized ssd. I believe it should not have any issues running several docker containers. Again, all being used by HA, not planning on doing anything else with it at the moment.

That should be more than enough if you are not doing any machine learning or other heavy stuff. My NUC is also an old i3, with 16 GB RAM and 1 TB SSD and I run HA along other VMs that run docker containers, in total more than 50 containers and it all works flawless.


If you are only ever going to use it for HA then I’d go with a plain Debian 10 install instead of Ubuntu. That way if you ever want to switch to a HA Supervised install you will still be fully supported.

There really isn’t much difference between Ubuntu and Debian (if any) that I’ve really noticed.

That is interesting. So Ubuntu would not support a supervised install? Now I’m curious. :slight_smile:
Gonna have to check out the pros/cons or supervised install

No it will support it just fine.

It’s the HA dev team who won’t support you if you have a problem and you aren’t running Debian.

1 Like