Grafana is an open-source monitoring and data visualization software. It provides analytics and interactive visualization on the web for your servers, with features offering charts, graphs, and alerts. It supports integration with complex data sources such as Prometheus, Graphite, and ElasticSearch.
This tutorial will guide you through installing and configuring Grafana on your Debian 11 server.
Prerequisites
To follow this tutorial you need:
- Basic knowledge of the Linux command line.
- A Debian 11 server with a non-root user with
sudo
privileges. You can get affordable, and powerful Debian servers from our website, and you can check out our How to access your server using SSH guide to learn how to access your server and create asudo
user. - The LEMP stack (Nginx, MariaDB, and PHP) installed on your server. Use our Installing LEMP on Ubuntu 22.04 LTS guide to set it up.
Note: You can use our LEMP 1-Click App to set up LEMP automatically when creating a server. Just visit our website, choose a server, and while prompted to choose the operating system, choose LEMP from the dropdown menu, complete your checkout, and in a couple of minutes our algorithms will take care of all the complex technicalities for you.
- A TLS/SSL certificate, because Grafana can access sensitive information about your infrastructure.
Step 1: Updating the Package Cache and Installing Nano
Start by updating the packages in the package manager cache to the latest available versions using the following command:
sudo apt update
Next install the Nano editor which you'll later use in this article:
sudo apt -y install nano
Step 2: Install Grafana
To install Grafana, you will need to first add its APT repository. First get the official GPG key from the Grafana website and using the following command:
wget -q -O - https://packages.grafana.com/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/grafana.gpg > /dev/null
This downloads and stores the key in /usr/share/keyrings/grafana.gpg
.
With the GPG key downloaded, add the Grafana repository to your APT sources
by subscribing to our newsletter.
A note about tutorials: We encourage our users to try out tutorials, but they aren't fully supported by our team—we can't always provide support when things go wrong. Be sure to check which OS and version it was tested with before you proceed.
If you want a fully managed experience, with dedicated support for any application you might want to run, contact us for more information.