Enabling Grafana Iframe Embeds

Enabling Grafana Iframe Embeds

"Grafana dashboard panel embeds aren't enabled by default, despite being able to generate an iframe embed. This article will offer a quick guide to resolving iframe embedded issues. "

August 6, 2025
1 min read

ENABLE GRAFANA EMBEDDING

Navigate to the defaults.ini file and look for the [security] section. Under it ther is an allow_embedding = false. Change the value to true.
If you are configuring you Grafana instance using environment variables, set the key=value as GF_GRAFANA_ALLOW_EMBEDDING=true

ALLOW UNAUTHORISED USERS ACCESS

Don't think you are done yet by enabling embedding. The embedded iframe will display a login form. This may not be the intended goal especially if you are sharing the embed to the public.
To resolve this, in the same defaults.ini file, go to the [auth.anonymous] section and change the default values of the following keys to:


 [auth.anonymous]
 enabled = true
 org_name = 
 org_role = Viewer

Replace org_name with your target organization. I found this configuration to be necessary as I experienced issues with loading the shared dashboard panel.

To override these default setting with environment variables, set them as GF_AUTH_ANONYMOUS_ENABLED=true GF_AUTH_ANONYMOUS_ORG_NAME=<my_org> GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer.

P.S.: Respect sentence case when setting the environment variables!

Happy sharing!