How to Install Grafana on Ubuntu 22.04 | 9 Steps

How to Install Grafana on Ubuntu 22.04 | 9 Steps
Published on Nov 24, 2023 Updated on Nov 7, 2025

Grafana is a valuable tool that allows users to perform in-depth data analysis to gain insights into the behavior and performance of their system or application. This article will walk you through how to install Grafana on Ubuntu 22.04.

By the end of this guide, you should be ready to take advantage of Grafana's capabilities to monitor and visualize your data effectively.

#What is Grafana?

Grafana is a popular open-source analytics and interactive visualization web application designed for monitoring and visualizing data and creating interactive dashboards. It allows you to query data and build graphs, charts, and dashboards of the data (metrics & logs) from various supported data sources, making it easier to interpret and understand the data.

#What is Grafana used for?

Grafana enables you to create interactive and visually appealing dashboards for data visualization, similar to Tableau or its competitors. It allows real-time monitoring of various data sources, for example, for monitoring Kubernetes clusters, and supports in-depth data analysis, providing insights into your system's performance. This can help you make more informed decisions. Grafana also allows you to set up alerts based on predefined conditions, notifying you of issues before they become problems.

#Prerequisites

This is a practical demonstration will show you how to install Grafana on Ubuntu 22.04 with practical examples, and to follow along, make sure you have:

  • An Ubuntu server (for this demonstration, a server from Cherry Servers was used).
  • A non-root user with sudo access

Not using Ubuntu 22.04? Check our guide on How to Install Grafana on Ubuntu 24.04

#How to Install Grafana on Ubuntu 22.04: Step-by-step process

This section provides step-by-step instructions on how to install Grafana on Ubuntu 22.04 using the official APT repository.

#Step 1 - Update and upgrade

First, you want to make sure your system's packages are up to date. You can do that by running the following command in your terminal:

sudo apt update -y && sudo apt upgrade -y

Update system packages

#Step 2 - Install the required packages

Next, run the following command to install the packages needed for the installation:

sudo apt install -y apt-transport-https software-properties-common wget

Install required packages

#Step 3 - Add the Grafana GPG key

Next, download and store the Grafana GPG key with the following commands:

sudo mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null

The first command creates a directory where the key will be stored. The second command will download, convert, and store the key in the specified location for secure APT package management.

Add Grafana GPG key

#Step 4 - Add Grafana APT repository

The Grafana package is not included in the default Ubuntu repositories by default. To install Grafana, you'll need to add the Grafana official APT repository to your system's APT sources. This will enable your system to recognize and retrieve Grafana packages during the installation process.

echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

After adding the repository to your system, update the package index to include information from the newly added repository using:

sudo apt update

Add Grafana APT repository

#Step 5 - Install Grafana

Now install Grafana using:

sudo apt install grafana

Install Grafana

#Step 6 - Start the Grafana service

Once the Grafana installation process has been completed, you can verify the version using:

sudo grafana-server -v

Next, start the Grafana service and enable it to start automatically at system reboot using the following commands:

sudo systemctl start grafana-server
sudo systemctl enable grafana-server

Start Grafana service

#Step 7 - Verify that the Grafana service is running

Now verify that the Grafana service is active by running the command below:

sudo systemctl status grafana-server

If the Grafana service was started successfully, you should see a sign that it is active and running.

Check Grafana service status

#Step 8 - Open the port in the firewall

Port 3000 is Grafana's default port for its web interface. To allow external access to Grafana, you must enable the firewall and open port 3000. To do this, execute the following commands in your terminal:

sudo ufw enable 
sudo ufw allow ssh
sudo ufw allow 3000/tcp

Enable firewall and open port

#Step 9 - Access the Grafana web interface

To access the Grafana web interface, open a web browser and enter the IP address of your server (or hostname if applicable), followed by port 3000. The URL format should be http://your_server_IP:3000. Once loaded, you should see the Grafana login page. The default credentials are:

  • Username: admin
  • Password: admin

Access Grafana web interface

You'll be prompted to create a new password. Input a secure password, confirm it, and click the "Submit" button.

Create a new password

Once done, you'll have access to Grafana's dashboard.

Grafana dashboard

#How to uninstall Grafana

If you need to uninstall Grafana for any reason, you can do so by running the following commands:

sudo systemctl stop grafana-server
sudo apt remove grafana

Uninstall Grafana

Also read: Server Monitoring with Prometheus and Grafana

#Conclusion

To sum up, this guide showed how to install Grafana on Ubuntu 22.04. Whether you are an IT professional or someone monitoring a server's performance, Grafana is an important addition to your toolkit that allows you to visualize, query, set alerts for, and understand your metrics and logs from supported data sources in a user-friendly manner. At this point, you should have Grafana installed and working on your Ubuntu server, and you can now go on to explore its features. Find more information on Grafana’s official documentation.

Cherry Servers offers reliable cloud infrastructure, ideal for deploying and scaling your Grafana monitoring setup. Our range of virtual and dedicated server solutions provides a flexible hosting platform with hourly billing and free technical support 24/7.

Learn more about us here!

Cloud VPS Hosting

Starting at just $3.24 / month, get virtual servers with top-tier performance.

Share this article

Related Articles

Published on Mar 26, 2026 Updated on Mar 27, 2026

Top 10 Dedicated Server Use Cases in 2026

Discover 10 real-world dedicated server use cases in 2025, from AI and gaming to fintech and streaming, where performance, control, and stability matter most.

Read More
Published on Mar 25, 2026 Updated on Mar 27, 2026

Forex Dedicated Server: 6 Providers to Maximize Your Trading

This guide reveals all you need to know about forex dedicated servers, including the six best providers to maximize your trading.

Read More
Published on Mar 16, 2026 Updated on Mar 27, 2026

Best Cloud Based Servers for Small Businesses

This guide walks through different types of cloud based servers for small businesses in plain terms with quick pros and cons, as well as some provider examples.

Read More
No results found for ""
Recent Searches
Navigate
Go
ESC
Exit
We use cookies to ensure seamless user experience for our website. Required cookies - technical, functional and analytical - are set automatically. Please accept the use of targeted cookies to ensure the best marketing experience for your user journey. You may revoke your consent at any time through our Cookie Policy.
build: bb3b3b788.1749