Grafana behind reverse proxy: Interactive charts work, rendered images not (nginx)

I have a grafana installation behind a nginx reverse proxy (http only, not https) and I have the strange problem, that embedding the interactive charts do work like a charm, but when I want to embed a rendered image I only get a broken image on my site and when I try to directly surf to the url of the image, I do get the following page:


Support Plans
Grafana v4.6.3 (commit: 7a06a47)

I’m not even sure if it’s a wrong grafana setting or a missing/wrong configuration of nginx. Any hint is highly appreciated. Thank you for your support!


When you say embed an image, do you mean that you placed an image in the /usr/share/grafana/public/img folder ? I’ll assume that’s what you mean.

Did you place Grafana at a subpath such as “” ? In that case, you need to add the subpath to the url of the image “”.

how have you setup grafana to access your data source? Direct or Proxy? Can grafana-server reach your data source? The png rendering happens on the server via spinning up a phantomjs app so the data source needs to be accessable from that server

my constellation is the following:
I’m running grafana + influx on a RPi3 together with a smarthome solution (openhab2).

What my system does:

  1. openhab stores data in the influxdb (=works)
  2. grafana can access and display these data and draws wonderful panels on a dashboard I defined (=works)
  3. when I “share” the panel (which means for me: embedding in some html pages which are being displayed in openhab, there are two ways to do so: Including the a) interactive chart or b) a rendered graphics on a html page on the same Raspberry, behind the same nginx reverse proxy.

And here start my troubles:
When I use the url which holds the interactive chart (eg in an iframe html tag on my openhab installation), everything is fine - in can see it in on my browser which displays a html page from the server (in an iframe).
But when I use to the url which should contain the generated image containing the chart in an image html tag, I only get a broken image. But when I use the url to a generated image locally on my browswer on my pc, then the image of the chart is being shown.

I neither found a error message in the nginx log, nor in the grafana log - and I still don’t know why it doesn’t work…

Tried now direct instead of proxy - no change. Still I don’t get the image, still I don’t know where to look for a hint or error message :frowning:

My grafna log file only shows this when accessing the url with the PNG image:
` t=2018-02-02T17:09:17+0100 lvl=info msg=Rendering logger=png-renderer path=“dashboard-solo/db/temperaturen?orgId=1&panelId=2&width=1000&height=500&tz=UTC%2B01%3A00”

I increased the log level - and found the following:
t=2018-02-02T17:26:22+0100 lvl=info msg=“Starting plugin search” logger=plugins
t=2018-02-02T17:26:23+0100 lvl=dbug msg="Checking for updates"
t=2018-02-02T17:26:23+0100 lvl=info msg=“Initializing CleanUpService” logger=cleanup
t=2018-02-02T17:26:23+0100 lvl=info msg=“Initializing Alerting” logger=alerting.engine
t=2018-02-02T17:26:23+0100 lvl=dbug msg=“Found old rendered image to delete” logger=cleanup deleted=0 keept=6
t=2018-02-02T17:26:23+0100 lvl=info msg="Initializing Stream Manager"
t=2018-02-02T17:26:23+0100 lvl=info msg=“Initializing HTTP Server” logger=http.server address= protocol=http subUrl= socket=
t=2018-02-02T17:26:24+0100 lvl=dbug msg=“Scheduling update” logger=alerting.scheduler ruleCount=0
t=2018-02-02T17:26:28+0100 lvl=dbug msg=“Looking for App Dashboard Updates” logger=plugins
t=2018-02-02T17:26:34+0100 lvl=dbug msg=“Scheduling update” logger=alerting.scheduler ruleCount=0

Does this point to a config error (

do you solve the problem? can you give some advice?