How to install Grafana on Ubuntu Server

Grafana is an open-source platform for data analysis and visualization. It allows users to easily create dashboards and graphs from various data sources such as Prometheus, Elasticsearch, and InfluxDB. In this tutorial, we will guide you through the installation process of Grafana on Ubuntu Server.

Prerequisites

Before installing Grafana, make sure you have the following prerequisites:

Step 1: Add Grafana Repository

To install Grafana on Ubuntu, we first need to add the Grafana repository to the package manager. To do this, follow the below steps:

  1. Open the terminal on your Ubuntu Server.

  2. Run the following command to add the GPG key:

    wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
    
  3. Once you have added the GPG key, add the Grafana repository to the package manager by running the following command:

    echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
    
  4. After adding the repository, update package manager by running the command:

    sudo apt-get update
    

Step 2: Install Grafana

Now that you have added the Grafana repository, let's install Grafana:

  1. Run the following command to install Grafana:

    sudo apt-get install -y grafana
    

    This command will download and install Grafana on your Ubuntu Server.

  2. Once the installation is complete, start Grafana using the following command:

    sudo systemctl start grafana-server
    

    This command will start the Grafana server in the background.

  3. To ensure that Grafana starts automatically when the server boots up, run the following command to enable the Grafana service:

    sudo systemctl enable grafana-server
    

Step 3: Access Grafana Web Interface

Now that you have installed and started Grafana, you can access its web interface by following the below steps:

  1. Open a web browser on your local machine.

  2. Enter the IP address or hostname of your Ubuntu Server followed by the port number 3000 in the address bar. For example: http://192.168.1.10:3000

  3. If you see the Grafana login page, you have successfully installed and accessed Grafana on your Ubuntu Server.

Conclusion

Grafana is now installed on your Ubuntu Server, and you can start creating and visualizing your data. If you encounter any issues during the installation process, refer to the official Grafana documentation or seek community support.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!