Version control of your openHAB conf directory (aka Github free private repos)

For those using git for version control of your openHAB conf directory… If you didn’t want to push your openHAB conf directory to Github because the repository had to be public (unless you wanted to pay the fee for a private repo), private repos are now free.

Haven’t tried it myself yet, so I’m not sure if there are any gotchas.


My Problem is at the moment that i am not very familiar with github. Maybe someone is willing to document such a setup maybe with Visual Studio Code.


that’s great News. perhaps some “sensitive” information aka Passwords, WiFi, etc. could be encrypted or stuff?
even if it’s private - it’s still cloud, isn’t it? :wink:

As far as I read, the only downside is that you can just collaborate with 2 other people in the free private repos.

Guess thats not that huge of an issue for the openHab conf :wink:

This is great news, thanks for sharing it! But, I’ve also been thinking about pushing my configuration to a public repo. I think sharing the full configuration trees (done properly) would be beneficial for not only self configuration control, but for allowing others to pick and choose portions for their own configuration, for sharing example rules code in the forums, even helping audit each other’s configs, etc…

Of course, “done properly” is the key phrase. It means removing any private stuff (cloud account user ids, passwords, location items, even weather location settings, etc…) from the commits, by e.g. putting all of that information in a single file, and adding a git.ignore for it. Failing that, all of your private configuration and identity would be made available for the whole world :slight_smile:

A lot of home assistant people do this. But they have the concept of a secrets file which is able to hold a password for an alias value. So in your config you use the alias and the system translates it.

It means there’s a lot of configs on github…which is a blessing since the documentation is a little sketchy you need to be able to see working configs a lot of the time to get things working.

That is where I got the idea from (Dr Zzz’s YT channel to be exact) :slight_smile:

I may volunteer to act as the guinea pig and try this - let everyone see my dirty “laundry” of config files - maybe even write up a post on how to do it “properly” and tie it into VSCode…

My slightly hacky way of doing this is

  • having only placeholders where credentials are necessary (bridge things, service configuration for openhab, …)
  • inject the secrets into environment variables
  • a few startup scripts that take those secrets from the environment

See my example of injecting the openhab-cloud secrets into the running docker image over at github:

works perfectly for me in my main and development environments. I have at at least four openHAB installations running at atny moment, one productive (so the family does not complain that I have killed the home automation again), and three testbed installations which I run with different language settings to test internationalization.

Aaaand, of course, any number of test installations where I test the specific bindings I hack on.