Grafana and nginx reverse proxy with docker

I use docker to deploy Grafana v4.4.1 and Nginx v1.13.1 on different server. the Nginx server is, and the Grafana server is

My nginx conf like that:
upstream grafana {
server {
listen 80;
location /grafana/ {
proxy_pass http://grafana/;

My grafana conf in compose.yaml like that:
image: grafana/grafana:4.4.1
- "3000:3000"
GF_SERVER_ROOT_URL: ‘%(protocol)s://’

When I access the url ‘’ in browser on my laptop, only the black screen in browser window, no login page and anything else. And the grafana log does not output anything. The last output is ‘t=2017-07-14T06:18:20+0000 lvl=info msg=“Initializing HTTP Server” logger=http.server address= protocol=http subUrl=/grafana socket=’

try setting GF_SERVER_ROOT_URL to

Thanks your reply. But it doesn’t work.

I found if I don’t use the subpath, and followed the office docs, everything is OK.
It seems subpath maybe have some issues is Grafana

Thousands use subpath & nginx as a reverse proxy without issue so it must be a config issue you’re experiencing