Linux

Where Does Grafana Store Config, Database, and Plugins?

Where Grafana keeps grafana.ini, the SQLite database, plugins, and logs on Linux package installs and Docker.

Last updated

Grafana splits its files three ways on a Linux package install: config in /etc/grafana, the database and plugins in /var/lib/grafana, logs in /var/log/grafana. Docker remaps the same trio under /etc/grafana, /var/lib/grafana, and volumes you choose.

The edit rule is simple: custom.ini holds your changes, defaults.ini is reference only. Most broken upgrades come from editing defaults directly and watching the package manager overwrite a year's tweaks. Dashboards in the database need their own backup apart from provisioned files.

Where Grafana stores this, by platform

Linux
/var/lib/grafana

grafana.db, plugins/, and session data here. Back this tree up with the server stopped for a consistent copy. Docker users map it to a named volume; the container path stays /var/lib/grafana.

Linux
/etc/grafana

grafana.ini (or custom.ini) plus ldap.toml live here. Keep a commented copy of every change for the next upgrade. Environment variables with GF_ prefixes override these files, which is the Docker native way.

Frequently asked questions

which grafana config file should i edit

Only custom.ini (or grafana.ini on some installs), never defaults.ini. Copy the section you need from defaults into custom and change it there. Package upgrades replace defaults but preserve custom. Restart the server to apply.

where is the grafana database

In grafana.db under /var/lib/grafana (or /var/lib/grafana/data in Docker). It holds dashboards, users, and alert state. Provisioned dashboards from files are the exception: those live in their YAML directories, not the database.

where are grafana plugins installed

In /var/lib/grafana/plugins for packages, or a mounted plugins path in Docker set via GF_PATHS_PLUGINS. Unsigned plugin flags live in custom.ini beside the plugin dir setting. Keep plugins and database backups in step with each other.

Notice an outdated path? Let us know.