Grafana: Enable Dashboards Public Access

Posted May 30, 2020 by Yaroslav Grebnov ‐ 2 min read

Grafana is a powerful open source tool allowing to create dashboards of different types, which can be used to dynamically display various data: metrics, status reports, tests execution results etc.

In this tutorial: Grafana, Influxdb, Docker: Pie Chart Dashboard Creation Tutorial we have shown:

  • how to setup and configure an environment with a Grafana server and an InfluxDB server, using docker-compose,
  • how to configure a datasource in order to display InfluxDB database data on Grafana dashboards,
  • and how to create and configure a Grafana dashboard.

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 log in. The steps to do this are described below.

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.