Complete guide on setting up Grafana/InfluxDB with Home assistant using official Docker images

so, can I instal 1.7.8 like you, with the commands used in step 1 ?

Use, e.g.

docker run -d \
--name="influxdb" \
--restart always \
-p 8086:8086 \
-p 8083:8083 \
-v /volume1/docker/influxdb/:/var/lib/influxdb \
influxdb:1.7.11

thanks for your time !

next problemā€¦ installing grafana. The docker container stops.
so i use

docker run -ti --user root --volume /volume1/docker/grafana --entrypoint bash grafana/grafana-enterprise:8.2.0

(Run Grafana Docker image | Grafana Labs)

and then

chown -R root:root /etc/grafana && \
chmod -R a+r /etc/grafana && \
chown -R grafana:grafana /var/lib/grafana && \
chown -R grafana:grafana /usr/share/grafana

then i get chown: unknown user/ group grafana:grafana
what could be my mistake ?

Same kind of version issue, probably.
My guess is that Grafana was at version 6.x when this guide was written.

Or maybe permissions? Start with chmod 777 on /volume1/docker/grafana to see if that fixes it.

there is no group named grafana, the user grafana is in the group ā€œrootā€
so adjust to
chown -R root:root /etc/grafana &&
chmod -R a+r /etc/grafana &&
chown -R grafana:root /var/lib/grafana &&
chown -R grafana:root /usr/share/grafana

(i installed influxdb 1.8)

Ok. Thanks. I Will try when i have some more free timeā€¦

if I would use influxDB to collect data from external sensor not available in HA, I need to add also influxdb config in my configuration.yaml?

Only if you want them in HA as well, but if so, yes.

Iā€™m confused somewhat on what needs to be done now to net the renderer set up in the latest version of Grafana.

Does anyone have a decent tutorial to get it running?

I donā€™t use docker-compose so it would be nice to get a docker run command to set up the renderer to be used along with the Grafana container.

This looks like the answer Iā€™ve been searching for. Thank you.

But would you explain the steps to configure the SSL certs and open access to Grafana in my router (port assignments) please?

I am running all in separate Docker containers on the same host machine.

EDIT> So I now finally have full visibility of my Grafana panels in Lovelace, whether viewing over LAN or WAN. I simply needed to set up NginX Proxy Manager, with SSL certs for Grafana. I then used the eternal https, rather than the local http embed links within the Lovelace iframe cards.

Sorry, I have been away for a long time. Good that you got it working. Hass will require that the panels are available in the public network and this will require that Grafana is accessible from Internet. This will require two things:

  1. Your router need to allow accessing Grafana from Internet. How to do this, differs between routers. Normally the feature is called as port forwarding
  2. Your Grafana connection need to be secured using SSL. This will require certificates. I am using Letā€™s Encrypt. See e.g. how to configure Letā€™s Encrypt for Hass here. The files I have copied to the place seen in Grafana Docker configuration

for docker compose use, user: ā€œ0:0ā€ fixed the constant crashing for me:

  grafana:
      image: 'grafana/grafana-oss'
      container_name: grafana
      restart: unless-stopped
      network_mode: host
      user: "0:0"
      volumes:
        - /opt/grafana/lib:/var/lib/grafana
      depends_on:
        - influxdb
      restart: unless-stopped

Hi, i would like to migrante all my configuration from haos to docker. Now Iā€™m using influx and graphana as haos add-ons. Is there a way to retrieve a backup of their configuration and load it on influx and grafana docker version?

Hi @arsaboo,

While adding the URL in the generic camera integration in home assistant, it says ā€˜URL did not return a valid still imageā€™. I can see the image in the browser. Can you please help