Does ${ENV:VAR} substitution work in service .cfg files (e.g. influxdb.cfg)?

In openHAB 5.2.1, I confirmed that ${ENV:VARIABLE_NAME} substitution works in .things files. However, I’m unsure if
the same syntax works in service configuration files like services/influxdb.cfg.

Example:

version=V2
url=http://localhost:8086
db=openhab
retentionPolicy=one_year
token=${ENV:INFLUXDB_TOKEN}

Does the ${ENV:…} substitution get applied to .cfg service files as well, or is it only supported in .things files?
If not supported in .cfg files, what is the recommended way to keep the InfluxDB token out of the config file?

Currently, this only works with thing files. Service configurations are not yet supported. However, I believe work is underway on that.

I personally use an external tool, Ansible, in my case, to generate these configurations. This allows me to push the configuration itself to GitHub.

However, you shouldn’t consider this for security reasons, Reading an environment variable on a system, even inside a container, is just as easy as reading a configuration file.

Thanks for your reply. However my server is local, my configuration is in github. So having the credentials only on my local server (like in .things) would be an advantage to me. I’ll keep my eyes open for future updates

Got a link? My PR was rejected, and I’m not aware of other attempts atm.