Configuration files necessary for identical new installations

  • Platform information:
    • Docker container with a running Openhab installation
    • Java Runtime Environment: Zulu 11
    • openHAB version: 3.0.0.
  • Issue of the topic: Configuration files necessary for identical new installations

I have a docker image which has a persistent Openhab installation on it. Whenever this container is restarted, it isn’t required to reinstall Openhab, but instead it starts off with a bare bones installation, without anything defined. My question is, which files are required so I don’t need to do the account and timezone etc. setup all over again every time I restart the docker image? Also, I want to have a few bindings persistently installed on the container. All I want to know is which configuration files are required for this.

I would expect all the mapped volumes listed on Docker Hub. In fact, I have stopped a container, deleted it, and started a new container based off a newer OH image without needing to do any configuration.

I meant where does Openhab store these files or this information.

That depends on where you tell Docker to store them. That is the purpose of the volume mapping and is documented by OH here.

https://hub.docker.com/r/openhab/openhab/

I suppose forget that it’s a docker image. I have a virtual machine which has Openhab installed on it. What are the config files exactly called that store information about the user information and user settings such as timezone etc. which are set up when you first start Openhab?

How are you running Docker in the VM ? I use docker run. Some use docker compose or some other process.

In my case it is specified ion the docker run command line.

I don’t run Docker directly. I have a different program which starts the docker images. I just need the config files so I don’t need to redo the initial setup every time I start the docker containers since all changes made while they are started are not persistent, which is the intended behavior of the program which runs the docker images.

So the answer is in that program configuration then.

When I first start Openhab and create the new user and set the password, as well as set my timezone etc., where does Openhab store this information? This is my question, it has nothing to do with docker images.

It is likely down in the userdata tree somewhere. You really need to copy the data from all mapped volumes though.

The XP Problem is such a boor. As Bruce was trying to point out, you need to have all of /openhab/conf and all of /openhab/userdata persisted. If you want to “clone” an instance of OH, you need all of those files. NOTE: Those are the paths inside the container. If you’ve installed OH through APT the folders are /etc/openhab and /var/lib/openhab.

If you are using a different program to start the docker images, you need to learn how to tell that different program to save those two folders to a docker volume or mount folders from the host into those locations so all the contents of those two folders are kept outside the continer.