---
title: How to Install Grafana on Rocky Linux 8
url: https://docs.vultr.com/how-to-install-grafana-on-rocky-linux-8
description: Learn how to install Grafana on Rocky Linux 8 with our step-by-step guide. Set up this powerful open-source analytics and monitoring platform quickly and easily.
publish_date: 2022-02-18T00:00:00Z
last_updated: 2026-09-11T16:41:59.951894Z
header_image: https://assets.vultrdevrel.com/docs-main-doc-assets-1/1222/dbeb4b0d67a82234.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

Grafana is a great open-source data visualization and monitoring tool that can be installed on Rocky Linux 8. It has a wide variety of features that make it perfect for monitoring your server performance and activity.

With Grafana, you can quickly see which services are running on your server and how they’re performing. You can also see detailed information about CPU usage, memory usage, and disk space usage so you can keep your server running smoothly.

This guide explains how to install Grafana on Rocky Linux 8.

## Prerequisites

* Deploy a [fully updated](https://docs.vultr.com/how-to-update-a-vultr-cloud-server#how-to-update-almalinux-centos-rocky-linux-and-vzlinux) Vultr Rocky Linux 8 server.
* Create a non-root user with sudo access

## Installing Grafana

1. The default Rocky Linux Repository does not contain Grafana. The first step is to add the Grafana RPM repository.
Open a new repo file named *grafana.repo* using your preferred text editor.

        $ sudo nano /etc/yum.repos.d/grafana.repo

1. Populate the *grafana.repo* file with the following lines. Save and close the file.

        [grafana]  
        name=grafana  
        baseurl=https://packages.grafana.com/oss/rpm
        repo_gpgcheck=1
        enabled=1
        gpgcheck=1
        gpgkey=https://packages.grafana.com/gpg.key
        sslverify=1  
        sslcacert=/etc/pki/tls/certs/ca-bundle.cr

1. Update the system packages so that all the changes take effect.

        $ sudo dnf update

1. Run the `repolist` command below to verify that the Grafana repo is listed.

        $ sudo dnf repolist
        repo id                                      repo name
        appstream                                    Rocky Linux 8 - AppStream
        baseos                                       Rocky Linux 8 - BaseOS
        extras                                       Rocky Linux 8 - Extras
        grafana                                      grafana

1. Install Grafana by running the command below.

        $ sudo dnf install grafana -y

1. Start, stop, and restart the Grafana service on your server. Grafana provides a systemd unit file that makes it easy to manage the service from the command line.

        $ sudo systemctl start grafana-server 
        $ sudo systemctl stop grafana-server 
        $ sudo systemctl restart grafana-server 

1. At this point, your Grafana server is running. Check the status of the service to make sure that everything is working correctly.

        $ sudo systemctl status grafana-server
    
        grafana-server.service - Grafana instance
        Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; disabled; ve>  
        Active: active (running) since Wed 2022-02-02 14:02:40 UTC; 58s ago

1. Enable the Grafana service to start automatically during boot.

        $ sudo systemctl enable --now grafana-server
                
        Executing: /usr/lib/systemd/systemd-sysv-install enable grafana-server  
        Created symlink /etc/systemd/system/multi-user.target.wants/grafana-server.service → /usr/lib/systemd/system/grafana-server.service.

## Configuring Your Firewall for Grafana

Open the port in your firewall so you can access Grafana from another device. The process depends upon which software is running on your Linux server. This demo uses the firewalld firewall.

1. By default, grafana listens on port 3000. Ensure that your grafana service listens on port 3000.

        $ ss -alntup | grep grafana
        tcp   LISTEN 0      128                *:3000            *:*    users:(("grafan -server",pid=86078,fd=9))

    **Note**: If you already have another app that uses the 3000 port, you will get an empty output from your Grafana server. You will need to change the **http_port = 3000** value in the *usr/share/grafana/conf/defaults.ini* file to something else, such as 3001. Then restart the Grafana service.  

        $ sudo nano /usr/share/grafana/conf/defaults.ini  
        $ sudo systemctl restart grafana-server  

1. Open port 3000 and allow the Grafana service through your firewall.

        $ sudo firewall-cmd --add-port=3000/tcp --permanent

1. Reload the firewall to apply all of the new changes.

        $ sudo firewall-cmd --reload

1. Finally, verify that the 3000 port has been opened.  

        $ sudo firewall-cmd  --list-all
    public (active)
      target: default
      icmp-block-inversion: no
      interfaces: eth0 eth1
      sources:
      services: cockpit dhcpv6-client ssh
      ports: 3000/tcp

## Accessing Grafana Web UI

Now that everything is configured, it's time to access Grafana web UI. Open the browser and type the IP address of your Grafana server followed by:3000 to access Grafana Web UI.

1. For example, if your Grafana server IP address is 192.168.1.100, then visits:

        http:192.168.1.100:3000/

1. On the login screen, provide the default username and password to access the Grafana dashboard.

        Username: admin

        Password: admin

1. Click **Log in**.  

1. On the next screen, provide a secure password for the Grafana dashboard. Click **Submit**.  

After successfully logging in, you will get the Grafana Dashboard. You can now add data sources and visualize data.  

## Conclusion

You have successfully installed Grafana on Rocky Linux 8 and configured your firewall to allow access. At this point, you can create as many dashboards as you need and use Grafana as your visualization platform.

## More Information

Please refer to the official documentation for more information.

* [Grafana Documentation](https://grafana.com/docs/)
* [Grafana GitHub](https://github.com/grafana/grafana)
* [Grafana Community](https://community.grafana.com/)
