Grafana is a popular open source platform for monitoring, visualization, and observability. It allows you to build dashboards from metrics, logs, and other data sources such as Prometheus, InfluxDB, MySQL, and many more.
Grafana runs as a single systemd service, does not require a separate runtime stack, and is well suited for VPS and server environments.
This tutorial was tested on AlmaLinux 8/9 and Rocky Linux 8/9.
0. Prerequisites
Root or sudo privileges
Internet access
At least 1 GB RAM (2 GB recommended)
Port 3000 available on the server
1. Installing Grafana
1.1 Update your system
Update all installed packages:
dnf update -y
1.2 Install required dependencies
Install tools required for repository and package management:
dnf install -y dnf-utils wget
1.3 Add the Grafana YUM repository
Create the Grafana repository file:
sudo nano /etc/yum.repos.d/grafana.repo
Paste the following content in this file:
[grafana]
name=Grafana OSS
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.crt
Refresh repository metadata:
dnf makecache
Type y and press Enter when you will see the following message:
1.4 Install Grafana
Install Grafana using DNF:
dnf install grafana -y
2. Managing the Grafana service
2.1 Start Grafana
You can start the Grafana service by running the following command:
systemctl start grafana-server
2.2 Enable Grafana on boot
To configure Grafana to start automatically on system boot, run the following command:
systemctl enable grafana-server
2.3 Check service status
To check the status of the Grafana service, use the following command:
systemctl status grafana-server
The service should be shown as active (running).
3. Firewall considerations
If you are using a firewall other than the default iptables setup, ensure that port 3000 is open and allowed.
For example, if firewalld is enabled, allow access to port 3000:
firewall-cmd --add-port=3000/tcp --permanent firewall-cmd --reload
If you plan to expose Grafana publicly, consider:
Using a reverse proxy (NGINX or Apache)
Enabling HTTPS
Restricting access by IP or authentication
4. Accessing Grafana
By default, Grafana listens on port 3000.
Open your browser and navigate to:
http://your_server_ip:3000
Default login credentials:
Username:
adminPassword:
admin
Enter the default login credentials:
On first login, Grafana will prompt you to set a new password:
Enter a new password, confirm it, and click "Submit".
After that, you will be taken to the Grafana dashboard:
5. Basic usage
After logging in, you can:
Add a data source (Connections β Add new connection)
Create dashboards
Import community dashboards using dashboard IDs
Monitor system metrics, applications, or services
Grafana stores its configuration and data locally by default and does not require an external database for basic usage.




