How to Install Grafana on Debian 11

How to Install Grafana on Debian 11

To install Grafana on Debian 11, follow the steps below. Grafana provides its own APT repository for Debian-based distributions, which ensures you get the latest version. This guide will show you how to install Grafana from the official repository.

Step-by-Step Guide to Installing Grafana on Debian 11

Step 1: Update Your System
As always, it's a good idea to ensure that your system is up to date before installing any new software.
sudo apt update
sudo apt upgrade
Step 2: Install Required Dependencies
Install necessary packages for adding repositories over HTTPS:
sudo apt install -y apt-transport-https software-properties-common wget
Step 3: Add the Grafana GPG Key
Download and add the Grafana GPG key, which will allow you to verify the authenticity of the Grafana package:
wget -q -O - https://packages.grafana.com/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/grafana-archive-keyring.gpg
Step 4: Add the Grafana APT Repository
Now, add the Grafana repository to your system’s sources list:
echo "deb [signed-by=/usr/share/keyrings/grafana-archive-keyring.gpg] https://packages.grafana.com/oss/deb stable main" | sudo tee /etc/apt/sources.list.d/grafana.list > /dev/null
Step 5: Update the APT Package List
Update your package index to include the Grafana repository:
sudo apt update
Step 6: Install Grafana
Now, install the Grafana package:
sudo apt install grafana
Step 7: Start and Enable the Grafana Service
Once Grafana is installed, you need to start its service and enable it to automatically start on boot:
sudo systemctl start grafana-server
sudo systemctl enable grafana-server

You can verify that Grafana is running by checking its status:

sudo systemctl status grafana-server
Step 8: Configure Firewall (Optional)
If you are running a firewall on your server, you will need to allow traffic on Grafana's default port (3000). For UFW (Uncomplicated Firewall), you can do this with the following command:
sudo ufw allow 3000/tcp
Step 9: Access the Grafana Web Interface
Once Grafana is running, you can access it via your web browser. Open your browser and navigate to:
http://<your-server-ip>:3000
  1. The default username is admin.
  2. The default password is also admin.
  3. After the first login, Grafana will prompt you to change the default password.
Optional: Install Grafana Plugins
Grafana supports a variety of plugins for data visualization. You can install plugins by using the following command:
sudo grafana-cli plugins install <plugin-name>

After installing a plugin, restart the Grafana service:

sudo systemctl restart grafana-server

Conclusion

You now have Grafana installed and running on Debian 11. From here, you can start configuring data sources, creating dashboards, and visualizing your data.



    • Related Articles

    • How to Install Podman 3.4.2 on Debian 11 via openSUSE Repository

      Overview In environments running Debian 11, the official package repositories often do not include Podman version 3.4.2. If you are operating on a Debian 11 server or virtual machine and require this specific version for compatibility or feature ...
    • How to Install Docker on Robustel EG Series Gateways via Debian Package Manager

      ? Overview This document outlines the procedures for installing the Docker Engine on Robustel EG series edge computing gateways (running RobustOS Pro). By leveraging the device's Debian-based architecture, users can configure official Docker ...
    • Debian-Based Application Development Guide

      1. Overview 1.1. Target Audience and Use Cases This guide is designed for developers who want to build applications directly on the Debian system underlying RobustOS Pro devices. Compared to using the RobustOS Pro application framework, developing ...
    • How to Install KNX API Server on Robustel EG5120

      Overview The Robustel EG5120 is a high-performance industrial edge computing gateway. Robustel is proud to be the first manufacturer globally to achieve official KNX API Server certification, providing a standardized, secure, and modern interface for ...
    • How to install Home Assistant via Docker and download the necessary components

      ? Overview This document provides a comprehensive guide on how to install Home Assistant using a Docker container on Robustel Edge Gateways (EG Series) running RobustOS Pro. Additionally, it covers the necessary steps to download and configure the ...