Okay to start with openHAB on VM then migrate to physical machine?

  • Platform information:
    • Hardware: n/a
    • OS: n/a
    • Java Runtime Environment: n/a
    • openHAB version: n/a
  • Please post configurations (if applicable): n/a
  • If logs where generated please post these here using code fences: n/a
  • Issue of the topic:

I’m about to get started with openHAB (yay!), and I want to get started on a VM before I decide how I’m going to host it. Are the migration instructions to move from one installation to another?

I tried searching for migrat but only found information about migrating from openHAB 2 to openHAB 3 and migration specific to bindings and data persistence. I also tried searching for export but only found information about bindings. I then tried searching for reinstall and got instructions for openHABian, which seems promising, but it’s a little unclear. (Emphasis in this quote from documentation is mine.)

openHABian is a self-configuring Linux system setup to meet the needs of every openHAB user. It provides:

  • Complete SD-card images pre-configured with openHAB for the Raspberry Pi line of SBCs
  • The openHABian configuration tool to set up and configure openHAB and many related things on any Debian based system

What is unclear to me is this: are there two things called openHABian, one a configuration tool and the other a self-configuring system setup that contains said configuration tool; or is it all one thing? And if there are two things, can the configuration tool be used separately? If so, I think I already have my answer:

Initial configuration
You can have openHABian import a working openHAB configuration right from the start at installation time like when you migrate or reinstall: make the initialconfig parameter point to either a file or URL.

If I can’t use openHABian to do the migration I’m think of, well, I’m sure there is a way to do what I’m asking. If it’s non-trivial to do for some reason, I’ll do the less exciting part of figuring out a server first :rofl:


Simply backup and restore.

openHABian is the distribution / image. It includes openhabian-config - the tool that you call to execute a set of pre configured installation / settings.

openhabian-config also can be installed on other linux systems as explained in chapter openhabian/openhabian.md at main · openhab/openhabian · GitHub . But pay attention to the docs ( previous mentioned link ) it explains requirements and restrictions.

openhabian (distro) is for a raspberry pi. So, if you want to install it in a vm it is not an option. But you don’t really need it.
There is a good Installation on Linux page Installation Overview | openHAB
if you go with a debianesque distro it boils down to install Java 11, add repo to apt/sources.d, apt install openhab.
use backup/restore to move your configuration.
Personally I started on openhabian on a raspi 3b, moved to pi 3b+ cause it offered more RAM, later moved to a VM for the same reason and currently run it on dedicated hardware again (an old macMini after RAM upgrade)
In my experience oh and it’s java base benefit a lot from RAM > 1GB

That’s not right. You can install openHABian on top of any (generic) Debian no matter what’s below (VM or x86 or ARM) if you take care of the proper OS setup yourself.
However, most people greatly underestimate the efforts that need to go into this (particularly if you honestly sum up the time you need to spend and include the need to search for a lot of information first).

Then again, all of that now in turn the openHABian-on-RPi image install method relieves you from.

So @queens.dee.223 if you own a RPi start with that right away for its short-term benefits.
It’ll also protect you from hitting a number of potential pitfalls.
Plus no need to migrate later on, dedicated RPis are recommended anyway because they’re the best choice in production for most people .

Welcome to openHAB. If your into VM use, the other option is docker. Best to choose what you feel comfortable using, so if your new to docker it may not be the best option unless you wish to learn two new things at the same time.

If you choose to use a debian based Linux distro in a VM, then I can recommend using openhabian-config to install java and openHAB with. It should greatly save time.

Which ever way you choose to install just make sure when you ask for any help you make mention of how you installed openHAB. If you don’t include that people tend to assume your on a pi with openhabian image.

Thank you all for your replies!

I have too many physical-taking-up-space-IRL projects active at the moment to want to start up yet another one with actual hardware, but it seems like I can get started on my main computer with a docker image and then backup and restore to a dedicated RPi when I reach that point. I currently only have three devices – an air purifier and two smart lightbulbs that have been sitting in a box for a year! But I have other neat projects in mind already!

Thanks again!

Don’t feel you have to change, if you have a large powerful server you’re running anyway, then you may as well use it if you’re going to have it powered on regardless.

As a stark contrast to what you will be doing, I prefer to use a low powered device that is standalone. Electricity is $5 to 10 for the year to run mine, plus Lower heat generated that the house has to cool, and it takes up less space.

Plenty of users run with docker and are happy, so choose what will be easy for you to enjoy the process setting up openHAB and not having to fault find and learn too much all at once.

As @matt1 says, if it’s working fine don’t feel like you have to change. I’ve been running openHAB in an LXC container on a Proxmox server for some time, and I know others are too. It’s very simple, and the built in backup options in Proxmox make automated backups (and restoring after a cock-up) just child’s play! And it’s all on a tiny NUC, so power draw is only a little more than a Pi.

I’m sure whatever hypervisor you are using has similar features. Good luck whichever way you go!

Couldn’t agree more

I had never tried docker but knew openHAB and it was so easy to get running following the simple instructions on Docker Hub I had it running in five minutes

Then migration to another platform would be as easy as what T said

Plus the docker container on Docker hub is (I think) maintained by our very own Wouter (user wborn) who answers any question that are tagged docker here in the forum and addresses issues with lighting speed!

Thank you all for the continued discussion! I do not have a server that is up full-time, so the Docker setup would be temporary. I use Docker occasionally for software development. It’s been a while, but I’m familiar enough that I’m not worried. By the time I’m done wrapping up my other projects that are taking up space in three dimensions, I should have my three smart devices working and confirm this is something worth pursuing for me. I’m sure it will be. I love the idea of having a “smart” home so long as it isn’t sending my data off to who-knows-where!

Then I’ll look into which RPi to get as a dedicated server for this. I want to clean up the “IT Closet” – which is just a bunch of stuff mounted to the wall behind a table! – and probably will put the RPi back there as part of the reorganization.