Migrating Container install to Operating System install

I’ve currently got HA Container installed - as a docker image on a Pi4.

I’m thinking about setting it up again as a OS install - are there any guides or advice for doing this while retaining my current configuration? If I make a backup of my /config/ folder, can I copy the contents of it back to the OS install?

Also when googling this it seems most people are going the other way - OS to docker. My reasons for wanting an OS install instead are that i’d like to make use of the addons available, as well as snapshot backups/restores for future migration to different hardware. I’m not using my pi4 for anything other than HA now so is there any major downside to this that i’m missing?

Just copy your config folder over, but don’t forget to copy the hidden directories in the config folder too !

1 Like

There’s a reason for this, just look at some of the horror stories in this thread - Home Assistant just stops working!

My advice would be to stick with you docker install. Almost all addons can be configured on their own in docker to work with Home Assistant. What addons were you looking for specifically and I can link guides or posts on how to set them up for you with a container install?

Also, for backups, I wrote up a post that lets you set them up using a cronjob and rsync. Admittedly its not as easy as a snapshot, but it does work to backup your config directory, which is where everything is installed on a Home Assistant container install. What backup strategy when running Home Assistant in Docker? - #10 by mwav3

Thanks @mwav3 - and yes you’re right I know i can accomplish everything in docker. For instance I set up ESPHome in it. I just thought it would be nice to have my rasbpi as a ‘HA appliance’ with everything self contained, being able to easily edit yaml in the browser with the appropriate addon, update from within the OS. Just make it overall a simpler and more focussed environment.

That link is scary reading tbh - especially as im running it with almost the same setup: pi4, ssd, mariadb!

Something I’ll have to think about but thanks @francisp for confirming its as simple as copying the folder+hidden files over.

I definitely get that, and that’s really the way Home Assistant is designed to be. The OS install is the way I would recommend as an install for any new user not familiar with the basics of linux and docker. It was very hard for me to start out this way, but I didn’t really have a choice because I’m running an NVR and Ubuntu, and would have had to give that up or get another machine. The container install gave me the flexibility to run everything on the same machine and keep my OS.

But for you, the hard part was already done and you are already running the container version. I just couldn’t see going back to a managed OS myself, and I think anything you gain with the convenience of access to the addons will be lost with the rigidity of an OS you can’t control and the associated problems that come up that are now more difficult to fix. Based on that linked thread, it looks like something is wrong with either the new supervisor or OS, or who knows what, but we don’t have to worry about it on our end.

To your other points:

Its not in the browser, but I have Samba configured on Ubuntu and can access the config files in any windows laptop with a file editor . I also have Wireguard running in a container for a VPN and can access the config files remotely through Samba anywhere when I activate the VPN - I set it up this way - Wireguard Container

I can update easily through portainer by just going to “recreate” in the container and checking “pull latest image”

Screenshot from 2021-09-01 12-47-26

I get this is not all “one place” like Home Assistant OS but it isn’t too hard to go to these different screens/programs. If that’s definitely important to you I get switching, but just be aware of the downsides:

1- You probably will sacrifice performance. Docker is much more lightweight and able to manage resources better on its own. Just see the stories in the linked thread above from people running similar hardware to you with their performance specs posted.

2- You’re adding more layers - ie the supervisor, which is supposed to make things easier by doing it for you, but it creates more paths for failure and things to go wrong.

3- The HassOS is stripped down and sandboxed, you won’t be able to run most linux commands or install apt packages. This makes it much harder to fix and diagnose problems when things go wrong.

4- You won’t be able to install anything else on the machine outside of Home Assistant or an addon. This might not be that important to you now but could be a huge issue down the road.

1 Like

I have been running a Supervised install for 2 years (3 concurrent instances) , and never had the issues mentioned in your thread. I agree with the problems with HA OS, it is too locked down for people with a good Linux knowledge.

I’m curious what is causing their issues honestly. A few people I’ve known for awhile recently came over from Smartthings and I’ve been saying to them all to switch, and they’ve been having some of these performance issues too, which doesn’t give a good first impression. All are running RPIs, which come in many different “flavors” of performance. I would tend to think something isn’t configured right on their end, especially if everything is working fine for you francisp- I know you’ve been a long time user and many things I’ve learned about Home Assistant are from reading your old posts.

Thank you for taking the time to produce such a detailed response @mwav3

You’ve provided a compelling argument to stick with my docker install. One additional factor that I didnt mention is that im planning in the future to set up a ProxMox mini server, and intended to run HAOS in a VM - which would make it more straightforward to recover from the problems described in the thread you linked to. But still, it seems it could cause more problems than the benefits of any simplification could bring.

Thanks glad I could help.

A containerized environment like Docker will almost always be more efficient then a VM due to the way they access and distribute system resources. I never really liked the idea of a VM - which is basically a “machine within a machine”. Also, Home Assistant on HassOS actually is a containerized environment - all the addons and the core Home Assistant run in docker containers, they are just managed by the supervisor so all the docker stuff happens in the background and the user is generally unaware of it. Running it in a VM is now taking a containerized environment, and putting it in another machine, on top of another machine. That doesn’t sound very efficient to me, and just sounds like multiple potential failure paths. I think this article does a good job explaining the benefits of container environments vs VM’s.

I know proxmox is a VM basically, but I’m not really familiar with it. Maybe it works a little different and solves some of these problems? Others seem to have strong opinions about it one way or another on this thread, and may be good to post over there for some advice.

hi i am totaly new
how do you copy the hiden folders?

If you use samba, just show hidden files

image

1 Like