List of environment variables

If Grafana is open-source, then where is the list of environment variables?

GitHub repo

I tried searching the entire repo and org for a single environment variable (e.g. GF_SERVER_DOMAIN), but it never appears in the source code. Is this closed-source?

That list of env variables doesn’t exist in the source code, because source code tries to map env variable into config option.

E. g.

GF_SERVER_DOMAIN=x

is mapped into config option:

[server]
domain = x

So check default config and you will know which env variables you can use:

1 Like

Thank you, @jangaraj

But do you know where is the code that transforms GF_SERVER_DOMAIN into [server] domain?

No, there is no name of any env variable hardcoded.

It is just clever code - e.g. read default config and then try to find for each config option if there is env variable for that - if it is there, then override default value:

2 Likes

Thanks so much, @jangaraj !