How to save settings from

Hi all!

System: OH4.1.0/WinSrv2022Latest/AzuleJDK17Latest

I can’t figure out how to configure a parameter hostKey = ${karaf.etc}/host.key in a file userdata\etc\
I can tweak it in, but between OpenHab updates I have to make changes to this file every time.

For example, I can change a parameter sshHost = in a file conf\services\runtime.cfg ( = and it will remain unchanged during OpenHab updates.

What about other parameters not described in the file runtime.cfg?

Is it possible to do this: = ${karaf.etc}/host.key or with other params prom

The runtime.cfg file is handled by config dispatcher, an openHAB only mechanism which writes configuration updates from that file into others. As far I know the syntax of file allows to write any config (based on identifier) and override key/value pairs in there through sequence of internal APIs which lead to file update.
The runtime folder where karaf reside is considered by openHAB as volatile, hence it is flushed with each update, making use of it quite hard. I’d say that going with runtime.cfg is way to go. You can also check source code comments on this component:

Thank you.
This really works.

This needs to be shown in the documentation in the appropriate section, otherwise it says something like this: you need to directly edit the file (when they talk about changing the ssh port).

If you can, please submit two sentence update to openHAB docs repository. Its not very entertaining, but you will save time to others who fall into same trap.


Added a request to the bug tracker :slight_smile: