ELK Stack: Install Kibana on Ubuntu 20.04

Photo by Priscilla Du Preez on Unsplash

It’s called the Window into the Elastic Stack.

ELK stack has definitely taken over the open-source tools in the analytics industry. It provides one of the most incredible free tools we’ve ever seen in the industry.

In this tutorial, we’ll be going through the process of installing Kibana on an Ubuntu 20.04 server.

Without further ado, let’s jump right in.

Yes, dude. You got it right. Since Kibana works in combination with Elasticsearch, it is recommended to install Elasticsearch first before the setup of Kibana.

If you haven’t installed Elasticsearch yet, don’t stress yourself. Just check Installing Elasticsearch on Ubuntu, Mac, or Windows.

That’s said, let’s now check your Elasticsearch instance version. Head over to your terminal and run:

curl -XGET

⚠️ If your Easticsearch instance is on a remote machine that you’re accessing from another machine don’t forget to change the address

You’ll get an output like the below one:

"name" : "elaticsearch-instance",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "YzwI5fGCSKqvW3nT86TmPQ",
"version" : {
"number" : "7.15.2",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "93d5a7f6192e8a1a12e154a2b81bf6fa7309da0c",
"build_date" : "2021-11-04T14:04:42.515624022Z",
"build_snapshot" : false,
"lucene_version" : "8.9.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
"tagline" : "You Know, for Search"

The version of this instance is 7.15.2. Get yours in order to continue this setup.

We’re set to move to install Kibana.

To install Kibana, let’s first update and upgrade our system before proceeding.

sudo apt update && apt upgrade
sudo apt install kibana=elastic_version_number

We just downloaded Kibana. Hold on dude, there is one more step.

We have to change the configuration of our Kibana instance in order to access the dashboard from a browser.

Well, as you may think, we need to back up our current Kibana config file in order to roll back in case of failure.

sudo cp /etc/kibana/kibana.yml /etc/kibana/kibana.yml.bak

Open the configuration file of your Kibana instance.

sudo nano /etc/kibana/kibana.yml

Let’s assume that your Elasticsearch instance is on the same server as your Kibana instance.

The main thing we need to change in Kibana’s configuration is the server.host value. server.host specifies the host (with its IP or hostname) on which Kibana is installed.

Then change server.host value (Don’t forget to remove #):

server.host: ''

Save the file and let’s configure Kibana to run at startup and start its service.

sudo systemctl daemon-reload
sudo systemctl enable kibana.service
sudo systemctl start kibana.service

It’s time to check our brand new Kibana dashboard. You can access http://localhost:5601 in your browser and look at the magic.

Awesome my friend! We are done.

Till next time, take care.

Certified AWS Solution Architect, Fullstack Software Engineer & DevOps. I like Solving Challenging Software Engineering Problems & Building Amazing Solutions.