Monitoring and visualizing real-time data has become crucial for businesses to make data-driven decisions. Several tools exist to achieve this goal, including paid ones. Grafana is one such tool; however, it's free and open-source. It stands out from other analytics tools with its flexibility to connect to a wide range of data sources and its highly customizable, interactive dashboards. Unlike many paid tools, Grafana's open-source model provides powerful visualization at no cost, making it a scalable choice for teams of all sizes.
In this guide, we'll cover the step-by-step installation process of Grafana using the official Grafana APT repository. Let's dive into the process to get your Grafana instance up and running.
Prerequisites
A Virtual Machine (such as the ones provided by NodeShift) with at least:
- 2 vCPUs
- 2 GB RAM
- 10 GB SSD
Ubuntu 22.04 VM
Note: The above prerequisites are highly variable across use cases. A high-end configuration should be used for a large-scale deployment.
Step-by-step process to install Grafana on Ubuntu 22.04
For the purpose of this tutorial, we'll be using a CPU-powered Virtual Machine by and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account,
Step 2: Create a Compute Node (CPU Virtual Machine)
After accessing your account, you should see a dashboard (see image), here:
- Navigate to the menu on the left side.
- Click on the Compute Nodes option.

- Click on Start to start creating your very first compute node.
Next, select a geographical region from the Region dropdown, where you want to launch your VM (e.g. United States).
Step 4: Choose VM Configuration and Image
After you select your required configuration options, you'll see the available VMs in your region and as per (or very close to) your configuration. In our case, we'll choose a '4 vCPUs/4GB/80GB SSD' Compute node as the best possible match.
Next, you'll need to choose an image for your Virtual Machine. For the scope of this tutorial, we'll select Ubuntu, but you can choose any other option for setting up Grafana.
Next, you'll need to select an authentication method. There are two methods available: Password and SSH Key. We recommend using SSH keys as they are more secure option. In order to create one, head over to our
Step 6: Finalize Details and Create Deployment
Finally, if you may want, you can also add a VPC (Virtual Private Cloud), which provides an isolated section for you to launch your cloud resources (Virtual machine, storage, etc.) in a secure, private environment. We're keeping this option as default for now, but feel free to create a VPC as per your needs.
Also, you can deploy multiple nodes at once by clicking + in the Quantity tab.
Step 7: Connect to active Compute Node using SSH
As soon as you create the node, it will take few seconds or a minute to get deployed. Once it is deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
Step 8: Install Dependencies for Grafana
Before we move on to install Grafana, we first need to perform some prerequisites steps to set up dependencies which are required to install Grafana.
1) Let's start by updating the Ubuntu package source list for the latest version and security updates
sudo apt update
Output:
3) Add Grafana GPG Key
For secure APT package management, we'll download and store GPG Key using the following commands:
a) Create a directory to store the key
sudo mkdir -p /etc/apt/keyrings/
b) Download, convert, and store the key
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
4) Add Grafana APT repository and update package list again
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
sudo apt update
Output:
Step 10: Start and Enable Grafana
After the Grafana installation is complete, we will proceed to start and enable Grafana so that we can access its service.
1) Let's first verify the installation by logging the version:
sudo grafana-server -v
Output:
4) Verify the status
sudo systemctl status grafana-server
Output:
2) Access the web interface
Open a browser and paste the URL below to access Grafana's web interface
(replace ip with your server's IP address/hostname)
http://ip:3000
Once loaded, you should see an interface like this:
Once you create your new password and submit it, it will take you to Grafana's dashboard, which looks something like this:
SOCIAL SHARE CARD GENERATOR