page_title: Configuration page_description: Configuration guide for Grafana.
The Grafana backend has a number of configuration options that can be specified in a .ini config file
or specified using ENV variables.
$WORKING_DIR/conf/defaults.ini$WORKING_DIR/conf/custom.ini--config parameterNote. If you have installed grafana using the
deborrpmpackages, then your configuration file is located at/etc/grafana/grafana.ini. This path is specified in the grafana init.d script using--configfile parameter.
The ip address to bind to, if empty will bind to all interfaces
The port to bind to, defaults to 3000
This setting is only used in as a part of the root_url setting (see below). Important if you use github or google oauth.
This is the full url used to access grafana from a web browser. This is important if you use google or github oauth authentication (for the callback url to be correct).
Note This setting is also important if you have a reverse proxy infront of Grafana that exposes grafana through a subpath. In that case add the subpath to the end of this url setting.
The path to the directory where the frontend files (html & js & css). Default to public which is
why the Grafana binary needs to be executed with working directory set to the installation path.
Grafana needs a database to store users and dashboards (and other things). By default it is configured to
use sqlite3 which is an embedded database (included in the main Grafana binary).
Either mysql, postgres or sqlite3, it's your choice.
Only applicable for sqlite3 database. The file path where the database will be stored.
Only applicable to mysql or postgres. Include ip/hostname & port.
Example for mysql same host as Grafana: host = 127.0.0.1:3306
The name of the grafana database. Leave it set to grafana or some other name.
The database user (not applicable for sqlite3).
The database user's password (not applicable for sqlite3).
For postgres only, either "disable", "require" or "verify-full".
The name of the default grafana admin user (who has full permissions). Defaults to admin.
The password of the default grafana admin. Defaults to admin.
The number of days the keep me logged in / remember me cookie lasts.
Used for signing keep me logged in / remember me cookies.
Set to false to prohibit users from being able to sign up / create user accounts. Defaults to true.
The admin can still create users from the Grafana Admin Pages
Set to false to prohibit users from creating new organizations. Defaults to true.
Set to true to automatically add new users to the main organization (id 1). When set to false,
new users will automatically cause a new organization to be created for that new user.
The role new users will be assigned for the main organization (if the above setting is set to true).
Defaults to Viewer, other valid options are Admin and Editor.
Valid values are "memory", "file", "mysql", 'postgres'. Default is "memory".
This option should be configured differently depending on what type of session provider you have configured.
data/sessionsroot:password@/session_tableif you use mysql or postgres as session store you need to create the session table manually. Mysql Example:
CREATE TABLE `session` (
`key` CHAR(16) NOT NULL,
`data` BLOB,
`expiry` INT(11) UNSIGNED NOT NULL,
PRIMARY KEY (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
The name of the grafana session cookie
Set to true if you host Grafana behind HTTPs only. Defaults to false.
How long sessions lasts in seconds. Defaults to 86400 (24 hours).