Skip to main content

Grafana: Enable dashboards public access

· 2 min read
Yaroslav Grebnov
Golang developer, SDET

By default, in order to access Grafana dashboards, a user needs to log in. In some cases, if all Grafana dashboards are public to all your users, it is more convenient to access a dashboard directly, without logging in. The steps to do this are described below.

This post example assumes the Grafana environment has been setup using Docker containers, similarly to how it is described in this tutorial: Grafana, Influxdb, Docker: Pie Chart Dashboard Creation Tutorial.

Assuming the grafana Docker container is up and running, open an interactive shell to it:

docker exec -it --user root grafana bash

We will modify the configuration file which is writable only by the root user. And if you open a shell without specifying user, you will be connected as grafana user, not root.

In a Grafana 7.0.1 environment, the main configuration is specified in the defaults.ini file located in /usr/share/grafana/conf folder.

In order to enable dashboards public access in Grafana, enabled has to be set to true in [auth.anonymous] section.

Exit from the grafana container:

exit

Restart grafana container:

docker restart grafana

Open the Grafana GUI. Log out and open any dashboard URL. The dashboard is displayed, as expected.