Info about influxdb password (docker installation)

I’m in the process of setting up an OpenEMS installation consisting of Edge, UI and InfluxDB – using Docker. The InfluxDB deploy documentation mention the usage of a password:

docker exec openems_influxdb influx setup \
  --username openems \
  --password WKeuIhl0deIJjrjoY62M \
  --org openems.io \
  --bucket openems \
  --force

I’m wondering if I should change the password to a secret one, and if I then would need to change it somewhere else in addition. I couldn’t find another mention of the password in the documentation or docker files. It would be great, if someone could give me some context about the usage of this password to better understand it. Thx in advance.

You set the Password here afterwards - so you can choose any Password you want.

image

1 Like

To prevent misunderstandings: The password is only needed for InfluxDB v1, and for the current version the API key is used. If the API key is used, I would not have needed to specify a password at all?
If I got that right, I’d like to add this info to the getting started guide (and discuss it here before I open just another pr :slight_smile: ). My suggestion would be:

  • replace the password from the example by the string <replace with a secret password>
  • change NOTE Note down Token to --password is only needed for InfluxDB v1, for newer versions note down token
  • change ApiKey | InfluxDB-Token to ApiKey | InfluxDB-Token (or user:password for InfluxDB v1)

As Stefan already Stated Influx v1 is still the right Version to choose.

Maybe it would be better, if you test v2 first, before creating a PR and suggesting the Changes because i do not know if somebody already did this :slight_smile:

I guess as stated here OpenEMS is not intended to be used with v2:

Thanks for the additional information. And, I’m not saying, that you suggested that I should use v2. :wink: But as you suggested, I was reading and using the getting started guide where InfluxDB v2 is suggested, which I ended up with:

curl -sL -l -v localhost:8086/ping
*   Trying 127.0.0.1:8086...
* Connected to localhost (127.0.0.1) port 8086 (#0)
> GET /ping HTTP/1.1
> Host: localhost:8086
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 204 No Content
< Vary: Accept-Encoding
< X-Influxdb-Build: OSS
< X-Influxdb-Version: v2.7.12
< Date: Sun, 22 Jun 2025 07:48:26 GMT
< 
* Connection #0 to host localhost left intact

So, should we then change the docker compose file and the getting started guide to explicitly use InfluxDB v1? Or should we add a note/warning to the getting started, that using docker is only intended for development (because currently, there is none and the reply in the forum also didn’t read like it)?

Docker is not only for dev, but how would it be, if you try Influx v2 and report if it works for you so you find out the best fitting solution for you?

I’m happy to stick to the recommended version, which is v1, as you wrote:

Thus my question if we should add a note, that docker is for dev only or change the docker compose to use v1.

Nevertheless I’m happy to support where/if I can. As I’m new to OpenEMS, I believe I can better support by improving the documentation out of a freshman’s view, than evaluating the pros and cons of InfluxDB v1 vs. v2 for OpenEMS.
I can report back, that following the docker installation as documented in the current getting started guide InfluxDB v2 works without errors, the db seems to run, OpenEMS UI reports the component as fine (green check mark), and trying to view the history in the UI consistently just shows a yellow message “Error retrieving the data. Please try again later.”