Migration from Home Assistant OS to Docker or VM?

I am currently running home assistant OS on an Intel NUC without issues running several add-ons.

I am interested in getting a new server with a dedicated GPU to mess around with VM’s and GPU passthrough and having home assistant installed on that system. I was considering running TrueNAS scale or Unraid to be able to create VM’s and have HA running either on a VM or a container version.

Is the migration gonna be as simple as building a back-up of the config and when installing it, restoring it from said back-up?

I know that if i swap to a container version of home assistant that I will have to setup the add-ons again, I don’t mind. Are there any other considerations when it comes to migration?

You won’t be able to use the HA OS backup to restore to a HA Container install.

For one there is no service to restore a back up in HA Container.

And there are lot’s of extra stuff in a HA OS backup that is useless in a HA Container install.

the only thing you need to do to copy over your existing HA OS config is to manually copy the entire contents of your config directory (where you configuration.yaml resides and ensuring you get all of the hidden folders) then manually copying them to the new config directory once you install HA Container.

Just to be clear…

there are no add-ons in HA Container.

You need to manually create and configure the equivalent docker containers for each of the existing add-ons you are using.

4 Likes

Thanks for the reply! I will make sure to copy all the contents of the config directory.
Yeh, I knew about the add-ons, thanks again.

1 Like

If you’re running add-ons, you’ll probably want to install HAOS on a VM, not HA Container. You should then be able to transfer your backup.

3 Likes

I started with HyperV on W10, which worked fine, until my zigbee stick broke (and the new Conbee stick did not support Socat).
So I tried to switch to VirtualBox, but that was very unstable; so I moved to VMWare.

Then I got better hardware for the host, and installed it with Debian. The original thought behind it was to move to core or docker, but i really missed Supervisor.
So i set up a supervisor, but i want to use the machine also for other things, and that doesn’t really go well on a supervised machine.

So I ended up with running a Debian11 machine, with VMWare HAOS.

I also realized that another advantage of running it as Virtual Machine is the ability to take snap shots (which i store on an external NAS).
But since the backups of ha (supervised) are pretty ok, that is not really a requirement :wink:

1 Like

what if you are using the MariaDB add-on for your database? I would assume you’d have to back that up separately and point the HA Container to your MariaDB container?

TBH, I have no idea if the add-ons would still continue to function if you got rid of the supervisor. My guess would be yes but you would likely have a hard time interacting with them with no supervisor.

So you would need to manually re-create any add-ons you use as regular Docker containers instead of add-ons.

1 Like

supervisor doesn’t have addon :thinking:

I used debian supervised installation when I started with ha. I moved to docker compose after my server went out of memory twice in a week.
I find docker compose installation much better because you can setup your containers/addons the way you like, add cpu/memory restrictions with ease. I managed to letsencrypt every container I use and some other services that are not running in docker.
I know that lot of that is possible in other types of installation, but I was really struggling with supervised.
I realized that when I moved to docker compose.
Backups are easy to do. I have a backup inside home assistant but I don’t use it.
Instead I use duplicati web server to backup all containers.
There is a lot of info on docker compose on net and it’s not that hard to run ha in container.

Docker is great and easy to set up at first. I started my HA journey in docker because I thought the flexibility of being able to add other containers would come in handy later on.
But a few months on I am considering moving to HASS OS and dedicating the entire Raspberry Pi to it because there are some important limitations with the docker setup: there are no addons, SkyConnect works but is not fully optimised, still haven’t sorted out letsencrypt, no automatic updates, and most community advice is targeted at OS installs.
Now I would probably not recommend a docker installation to anyone starting out with HA

Let me address some things you wrote because they are not true.

“there are some important limitations with the docker setup: there are no addons,”
Yes, there are addons. This what you call addons are docker containers, but they are incorporated in hass os or debian supervised as addons. And you are not limited by the containers aka addons someone else decide to make official.

“still haven’t sorted out letsencrypt”
This is really easy to do in docker. Just try this.

“no automatic updates”
You can use watchtower to automate your updates. All your docker containers aka addons including home assistant will be updated on new release automatically.

Now about some benefits. Memory/cpu/gpu limits are easy to set up in docker based installation for every container including home assistant. Check how many post there is on this forum about high cpu/memory issues. All those installations are hass os or supervised.

You can provide additional security for each container as they usually runs as root. For me this is work in progress.

The main difference between container based installation and hass os or supervised is in engine, suspension, brakes and gear box. Container based installation has upgraded parts, so to say. :smiley: But on the outside car looks pretty much the same.

3 Likes

Thanks, Daniel. You’re right, it’s not that you can’t do the same things in a HA Docker install (as you hinted it can probably be more flexible; that’s what I thought when I started with HA), but that it usually involves a slightly more convoluted process and you better be more than comfortable with the command line and linux systems.

So it’s all down to ease of use, maybe.

Eg: setting up additional containers for things like Z-Wave JS or Letsencrypt can be done with a couple of clicks in Hass OS via Addons (or at least that’s what I am reading and hoping for when I migrate).

I thought I was comfortable enough with CLI to go with a Docker install and have plenty of the RPi resources left for other things, but it turns out that I wasn’t and this choice added an extra layer of complexity to every new thing I added or every debugging attempt.
I wish someone suggested to me that I start with Hass OS for a few months, learn the system without dealing with any complex installs, then maybe take it to a Docker install for a more advanced setup.

I’m still new to HA and coming from SmartThings I was blown away by the extensive level of detail and customisation that it offers, but at the same time I appreciated certain easy/simplified setups on the ST like the Smart Home Monitor.
So maybe the installation tutorial for HA should make some recommendation as to which is best for whom. Eg: easy GUI setup, perfect for new starters – Hass OS; already familiar with containers and command line and like to get your hands dirty – chose Docker;

I :heart: Home Assistant

1 Like

Well i started with supervised installation and i’m glad I moved to container one. When I move my system to docker containers I realized how much i was struggling with supervised installation.
I don’t say don’t go to hass os, but you will after some time probably realize that there is some problems. They are very hard to solve or you just can’t do it, like memory/cpu usage by containers.
If you plan to migrate your house to home assistant consider something much stronger than pi. Full desktop comp with at least one ssd with 250 gb of ram and 8 gb of ram will be a good starting point.
I don’t say that you can’t do it with pi, but I don’t think it is build for such a thing.

1 Like

Sorry for hijacking, but I’m in this same process and using WinScp to copy the folder /Config from HAOS to the Docker container. I’m getting “Permission denied. Error code 3”. I’m a newbie in linux, but I’ve read that I can change permission and get this done ok. But after this I would like to set the permissions back to the way they was, but that can’t be easy. How are you guys doing this?

Found this in another thread and will try it when I get back home

As others have said, the best option may be to install HAos as a guest, you’ll get the benefits of containers still, and you can restore your backups (I use google drive backup extension).

I’ve considered this, though you’ll probably face a slightly longer power on → ready time.
For pure reliability and resilience I’m using:

  • HAos on a NUC-i3
  • Ryzen-7 NAS running heaps of stuff including ZFS, Frigate

I’ve thought about using just one machine, however since HA runs my zigbee network and many important home functions, I keep the machine dedicated to HA only.

Not everything needs to run in HA or the same machine, e.g. frigate can be very intensive, after trying it on the NUC (11th gen i3) it chewed up to half of the CPU with 7 camera processing so I decided to chuck that on my NAS.

Depending on your needs, you could move HA to a raspberry PI or similar SBC, and use the NUC for a lite homelab.

I’m currently running HA OS in Win10/VM, but I’m planning to move to a dedicated Generic x86-64 PC installation. Even with Ryzen 5 3600 and 64 GB of memory VM often gives me a hard time and causes issues. So as described I’m going to migrate to a dedicated PC/laptop with 10th gen i5, 16GB and 250GB SSD. All that should be more than enough to run HA OS with Zigbee support and a handful of add-ons. There is also an additional benefit of having a large battery so the HA can run for many hours in case of a power outage (not that this happens often).

Now to the problem, I’m facing. I made the full back of the HA, but I’m getting an error while uploading it to the new machine. I know that you can’t migrate between some types of HA installations, but I assumed that this method will work on HA OS. Any advice on how to succeed or maybe there is some sort of workaround, like copying all folders and files from old to the new instance?

@Hubszo What VM engine are you using? VirtualBox?

Just asking as I also had big issues with VirtualBox (very unstable).
But once i switched to VMware Workstation, all my problems where solved :grin:

Just as a side note,
I also wanted to move from W10/VMware to a dedicated machine, but i didn’t want to give up Supervised. I didn’t want to spin up another machine, so i went for Debian 10 supervised.
But i rather quickly found out i couldn’t use the machine for anything else anymore.

So installed my VmWare workstation again (also happens to run on Debian), and all runs smooth again ever since, only difference is the host is now Debian instead of W10.
The VM uses 2 cores and 4Gb ram, and takes tops 10% cpu time of the host (normally around 1-2%).

The only downside is that VMWare workstation is a bit harder to configure, but once it runs, it runs :thinking:

Thanks for the reply and some suggestions. I’m indeed using VirtualBox which is the main reason for the migration. For reasons beyond this discussion, I can’t “abandon” Windows so Debian or any other Linux distro is no go. Also as mentioned I have a pretty decent laptop collecting dust so I have no problems running additional PC just for HA. I understand that different people will favor a different solution - actually, for the test purpose, I have a 3rd PC running Proxomo and HA :slight_smile:
As of now, it seems to me that the bare metal/generic x86-64 is the most elegant solution and I found it very frustrating that you can’t in an easy way migrate your setup and data.

It is possible to convert VirtualBox to VMWare :grin: