‍Grafana is a robust and versatile open-source observability and monitoring platform. It provides a customizable dashboard that enables users to visualize and analyze data, making it an invaluable tool in various IT and DevOps contexts. By gaining insights into systems, applications, and infrastructure, organizations can effectively monitor and optimize their operations. In this guide, we will walk you through the step-by-step process of installing Grafana on Ubuntu 23.10.

Step 1: Checking for System Upgrades

Before proceeding with the installation, it is essential to ensure that your system is up to date. Run the following command to check for any pending system upgrades:

apt update

Step 2: Adding the Grafana APT Repository

To install Grafana on Ubuntu 23.10, we need to add the Grafana APT repository. Execute the following commands to add the required dependencies:

apt install -y gnupg2 curl software-properties-common
curl -fsSL https://packages.grafana.com/gpg.key| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/grafana.gpg

Step 3: Installing Grafana CE

Now that we have added the Grafana APT repository, we can proceed with the installation. Run the following command to install Grafana on Ubuntu 23.10:

add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
apt -y install grafana

Step 4: Starting the Grafana Server

To start the Grafana server, use the following command:

systemctl enable --now grafana-server

You should see the following output:

root@vps:~# systemctl enable --now grafana-server
Synchronizing state of grafana-server.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable grafana-server
Created symlink /etc/systemd/system/multi-user.target.wants/grafana-server.service → /lib/systemd/system/grafana-server.service.
root@vps:~#

Step 5: Configuring the Firewall

To ensure that Grafana is accessible, we need to configure the firewall to allow incoming connections. Execute the following commands to enable and open the necessary ports:

apt -y install ufw
ufw enable
ufw allow ssh
ufw allow 3000/tcp

The output should look like this:

root@vps:~# ufw allow ssh
3000/tcp
Rules updated
Rules updated (v6)
root@vps:~#

Step 6: Restricting Access to a Specific Subnet

If you want to restrict access to Grafana from a specific subnet, you can use the following command:

ufw allow from yourserver.ip.address/24 to any port 3000

Replace “yourserver.ip.address” with the actual IP or domain configured on your server.

Step 7: Accessing Grafana

To access Grafana, open a web browser and enter the following URL:

http://server.ip.address:3000/login

Replace “server.ip.address” with the actual IP or domain configured on your server.

The default login credentials are as follows:

Username: admin Password: admin

Conclusion

Congratulations! You have successfully installed Grafana on Ubuntu 23.10. This powerful open-source observability and monitoring platform will enable you to gain valuable insights into your systems, applications, and infrastructure. With Grafana’s customizable dashboards, you can visualize and analyze your data with ease.

Remember to regularly update Grafana and explore its wide range of plugins and integrations to enhance its capabilities. If you need assistance with Grafana or any other cloud hosting solutions, Shape.host is here to help. Shape.host offers reliable and scalable Linux SSD VPS services, ensuring your infrastructure is in capable hands. Trust Shape.host for efficient and secure cloud hosting solutions.