Grafana.ini giving me the creeps

Hi all,

I have a grafana instance running in docker. I made my dashboards, with succes. The purpose is to EMBED these dashboards in a website.
Unfortunately, the EMBED function is not available in my grafana instance. After doing some research, it seems that I need to ENABLE the embed function in the grafana.ini file.
I went to my ssh console, connected to my docker, and tried to edit the grafana.ini using vi.

After completing the necessary edits in grafana.ini, I got the message that grafana.ini is in read-only mode. I’vve been trying to change the file permissions like a hundred times, but still no luck.

Can someone help me making grafana.ini not read-only ? This is a basic installation and somehow it should be possible to make changes to the ini file, not ?

I know this is probably rather a ubuntu/linux question, but I still hope to get an answer from my favorite forum

Thanks in advance !

Can anyone help please ?

So I seem to recall experiencing a similar issue when modifying the .ini file, and I cannot recall exactly how I got around it. Are you definitely logged in as a root user? (or does that concept not even apply to docker, which I admittedly have no experience with). Maybe try using something other than vi to edit / save the file?

That’s classic (non container) approach. Container approach will be different:

  • I went to my ssh console, reconfigured grafana container:
    • I added env variable -e GF_SECURITY_ALLOW_EMBEDDING=true, because that will overide default false value OR
    • I added volume to overide default grafana.ini with my custom grafana.ini -v /<local-host-path>/my-custom-grafana.ini:/etc/grafana/grafana.ini

I would say first option is better for beginners.

Doc is also your good friend: Configure Grafana Docker image | Grafana Labs

1 Like

Hi @jangaraj & @grant2,

Thanks for your answer and your help. Unfortunately I’m not able to have the grafana embed option to embed my dashboard.

I figured out to add the environment variables in portainer to my docker image (it has no persistent volume nor bind):

I’m using the docker image grafana/grafana , and I always end up with the embed function missing…

Are there other tips you might know to help me out ?

Thank you very much

You are not very specific (especially topic title). So let’s define what you do you wan first. You want to see “Embed” tab in your UI (source: Share a panel | Grafana Labs):

How to enable that? I don’t know.

You have configured for now:

# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
allow_embedding = true

So nothing is stopping you now to copy&paste URL from the browser into your custom made html iframe snippet manually. E.g.


and you don’t need “Embed” functionality in the UI.


I think you have touched on a “sensitive” issue and I doubt you will get any joy as from what I gathered GRAFANA do not favour embedding dashboards and will simply cold-shoulder you.

There are several posts on the embed a dashboard issues and all come to naught.

I have tried and there are authetication issues when using an iFrame. It wants you to login and when do it just revert to the login page. If you use kiosk mode it works but then one may simply bypass and get back to your root account and see and edit all your dashboards!

I believe the effort to resolve all this had led to it being put on the back burner and now just ignored.

Like you, (I think), I thought oh it would be great to just embed the dashboard and set it to allow just access to that particular dashboard and allow view-only access and maybe allow data download, but found otherwise!

I might be wrong but I do not have time to try more than what is on the help.

One may however happily embed PANELS as shown below



To see what I mean click on the link next to (on the LHS) the date picker.