Keywords: Grafana | anonymous access | configuration
Abstract: Based on Grafana Q&A data, this article explains in detail how to enable anonymous access by configuring [auth.anonymous] and specifying the organization name to allow viewing dashboards without a password. It extracts core knowledge points, provides code examples, and offers supplementary advice to help users correctly set up Grafana anonymous access.
Introduction
In Grafana, by default, viewing dashboards requires user authentication. However, for scenarios like public demos or internal monitoring, it is often necessary to enable anonymous access without passwords. According to the provided Q&A data, users may have attempted to enable anonymous access but still encounter password prompts due to incorrect configuration.
Core Configuration Solution
Based on the best answer, the key to implementing anonymous access in Grafana lies in properly configuring the anonymous authentication section. In the Grafana configuration file (e.g., grafana.ini), add or modify the following parameters:
[auth.anonymous]
enabled = true
org_name = ORGANIZATION
In this configuration, enabled = true enables anonymous access, and org_name must specify an actual existing organization name. Anonymous users will only be able to view dashboards from this organization, ensuring granular access control.
Additional Configuration Suggestions
Referring to other answers, further optimizations can be made to enhance user experience and security:
- Disable login form: In the [auth] section, set
disable_login_form = trueto hide the login page, simplifying the anonymous access process. - Set organization role: Use the
org_roleparameter to specify a default role for anonymous users, such asViewerorEditor. Typically, theViewerrole is sufficient for read-only access.
Implementation Steps
- Locate and edit the Grafana configuration file, usually found at
Grafana\conf\grafana.inior a similar path. - Add or modify the [auth.anonymous] section in the configuration file, ensuring
enabled = trueand settingorg_nameto an existing organization name. - Optional: Configure other settings as needed, such as disabling the login form or adjusting roles.
- Save the changes and restart the Grafana service to apply the configuration. On Linux systems, use commands like
sudo systemctl restart grafana-server.
Considerations
When configuring anonymous access, consider the following points: ensure the specified organization name exists in Grafana, otherwise access may fail; anonymous access can introduce security risks and should only be used in trusted environments; it is recommended to regularly audit configurations and combine them with other security measures such as network isolation.