Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Grafana on Ubuntu

This guide shows you how to install Grafana on an Ubuntu server and open it in your browser. It needs root access, so it is for VPS and dedicated server users.

VPS and Cloud Servers2 min read12 steps

What is Grafana?

Grafana is a free tool that draws charts and dashboards from your data. A dashboard is one screen with many charts, like the dials in a car. People use Grafana to watch how a server is doing, such as how busy its processor is.

Steps

  1. Log in to your server with SSH. SSH lets you type commands on a remote computer.
  2. Install the helper tools.
    apt update
    apt install -y apt-transport-https software-properties-common wget gnupg
  3. Create a folder for the signing key. The key proves the software is real.
    mkdir -p /etc/apt/keyrings
  4. Download and save the Grafana key.
    wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/grafana.gpg > /dev/null
  5. Add the Grafana software source.
    echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list
    This tells Ubuntu where to find Grafana.
  6. Refresh the list and install Grafana.
    apt update
    apt install -y grafana
  7. Start Grafana and make it start again after every reboot.
    systemctl enable --now grafana-server
  8. Check that it is running.
    systemctl status grafana-server
  9. If a firewall is on, allow port 3000. A port is like a numbered door into your server. For example, with UFW:
    ufw allow 3000/tcp
  10. Open a browser and go to http://YOUR-SERVER-IP:3000. Use the IP address from your welcome email.
  11. Log in with the user name admin and the password admin.
  12. Grafana asks you to set a new password. Choose a strong one.
Tip: Grafana only shows data after you add a data source, such as Prometheus or MySQL. In Grafana, open the menu, then Connections, and add one. Using a domain name and HTTPS in front of Grafana is safer for real use.

Quick recap

  • Grafana turns data into charts.
  • Add the Grafana software source and install with apt.
  • Start it with systemctl enable --now grafana-server.
  • Open port 3000 in your browser and change the default password.