Install on Debian or Ubuntu
Note on upgrading: While the process for upgrading Grafana is very similar to installing Grafana, there are some key backup steps you should perform. Read Upgrading Grafana for tips and guidance on updating an existing installation.
You can run Grafana on your own hardware or use Grafana Cloud and get Grafana without the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs and more. .
1. Download and install
You can install Grafana using our official APT repository, by downloading a package, or by downloading a binary .tar.gz
file.
If you install from the APT repository, then Grafana is automatically updated every time you run apt-get update
.
To install the latest Enterprise edition:
Add this repository for stable releases:
echo "deb https://packages.grafana.com/enterprise/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
Add this repository if you want beta releases:
echo "deb https://packages.grafana.com/enterprise/deb beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get install grafana-enterprise
To install the latest OSS release:
sudo apt-get install -y apt-transport-https
sudo apt-get install -y software-properties-common wget
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
Add this repository for stable releases:
Add this repository if you want beta releases:
After you add the repository:
sudo apt-get update
sudo apt-get install grafana
If you install the .deb
package, then you will need to manually update Grafana for each new version.
- On the , select the Grafana version you want to install.
- The most recent Grafana version is selected by default.
- The Version field displays only finished releases. If you want to install a beta version, click Nightly Builds and then select a version.
- Select an Edition.
- Enterprise - Recommended download. Functionally identical to the open source version, but includes features you can unlock with a license if you so choose.
- Open Source - Functionally identical to the Enterprise version, but you will need to download the Enterprise version if you want Enterprise features.
- Depending on which system you are running, click Linux or ARM.
- Copy and paste the code from the installation page into your command line and run. It follows the pattern shown below.
sudo apt-get install -y adduser libfontconfig1
sudo dpkg -i grafana<edition>_<version>_amd64.deb
Download the latest and extract it. The files extract into a folder named after the Grafana version downloaded. This folder contains all files required to run Grafana. There are no init scripts or install scripts in this package.
wget <tar.gz package url>
sudo tar -zxvf <tar.gz package>
2. Start the server
This starts the grafana-server
process as the grafana
user, which was created during the package installation.
If you installed with the APT repository or .deb
package, then you can start the server using systemd
or init.d
. If you installed a binary file, then you need to execute the binary.
Configure the Grafana server to start at boot:
sudo systemctl enable grafana-server.service
To start the service and verify that the service has started:
sudo service grafana-server start
sudo service grafana-server status
Configure the Grafana server to start at boot:
sudo update-rc.d grafana-server defaults
The grafana-server
binary .tar.gz needs the working directory to be the root install directory where the binary and the public
folder are located.
Start Grafana by running:
./bin/grafana-server web
- Installs binary to
/usr/sbin/grafana-server
- Installs Init.d script to
/etc/init.d/grafana-server
- Creates default file (environment vars) to
/etc/default/grafana-server
- Installs configuration file to
/etc/grafana/grafana.ini
- Installs systemd service (if systemd is available) name
grafana-server.service
- The default configuration sets the log file at
/var/log/grafana/grafana.log
- The default configuration specifies a SQLite3 db at
- Installs HTML/JS/CSS and other Grafana files at
/usr/share/grafana
Next steps
Refer to the Getting Started guide for information about logging in, setting up data sources, and so on.
Refer to the Configuration page for details on options for customizing your environment, logging, database, and so on.