How to Install and Configure Kibana on Ubuntu 20.04

In this guide, we will learn how to install and configure Kibana on Ubuntu 20.04.

Kibana is a proprietary data visualization dashboard software for Elasticsearch, whose open source successor in OpenSearch is OpenSearch Dashboards. It is a data visualization and exploration tool used for log and time-series analytics, application monitoring, and operational intelligence use cases. It offers powerful and easy-to-use features such as histograms, line graphs, pie charts, heat maps, and built-in geospatial support. Kibana also acts as the user interface for monitoring, managing, and securing an Elastic Stack cluster — as well as the centralized hub for built-in solutions developed on the Elastic Stack. 

Related Content:

# Table of Content

  1. Ensure the server is up to date
  2. Import the Elastic gpg key
  3. Install Kibana from the RPM Repo
  4. Starting and enabling Kibana service
  5. Enable the service in firewall
  6. Configuring Kibana
  7. Accessing Kibana

# 1. Ensuring that the server is up to date

Before proceeding, let us ensure that our server is up to date and all the packages are the latest version. Use these commands to achieve this:

sudo apt update
sudo apt upgrade -y

If there are packages to upgrade, the above command may take a couple of minutes.

Let us also install some common packages that we will need later:

sudo apt install -y vim wget

# 2. Import the Elasticsearch PGP Key

Elasticsearch signs all of our packages with the Elasticsearch Signing Key (PGP key D88E42B4, available from with fingerprint:

4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4

Download and install the public signing key:

wget -qO - | sudo apt-key add -

# 3. Install Elasticsearch from the APT repository

Save the repository definition to /etc/apt/sources.list.d/elastic-7.x.list:

echo "deb stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list

You can then install the Elasticsearch package with:

sudo apt-get update && sudo apt-get install 


Confirm the installation

$ apt-cache policy kibana
  Installed: 7.16.3
  Candidate: 7.16.3
  Version table:
 *** 7.16.3 500
        500 stable/main amd64 Packages
        100 /var/lib/dpkg/status

# 4. Start and enable Kibana service

The Kibana service won’t be started by default. Use this command to start:

sudo systemctl start kibana

Confirm the service status using this command:

$ sudo systemctl status kibana
● kibana.service - Kibana
     Loaded: loaded (/etc/systemd/system/kibana.service; disabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-01-18 21:22:30 UTC; 13s ago
   Main PID: 44218 (node)
      Tasks: 11 (limit: 4624)
     Memory: 435.3M
     CGroup: /system.slice/kibana.service
             └─44218 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli/dist --logging.dest=/var/log/kibana/kibana.log --pid.file=/run/kibana/

Jan 18 21:22:30 systemd[1]: Started Kibana.

The above output shows that the service is up and running. Enable the service using this command:

sudo systemctl enable kibana

# 5. Enable the service in firewall

If you have firewall installed and enabled, you need to allow the service. Use these commands to achieve that:

sudo ufw allow <meta charset="utf-8">5601/tcp

# 6. Configuring Kibana

Kibana configuration file can be found in this path /etc/kibana/kibana.yml. Kibana will run as a http service exposing port 5601. It is bound to localhost by default. Confirm this using this command:

ss -tulpn | grep 5601

This is my output:

$ ss -tulpn | grep 5601
tcp   LISTEN 0      511   *

To bind the service to all ports so the service can be accessed remotely, addd this line to the file: ""

To connect to an Elasticsearch instance, use this:

elasticsearch.hosts: ["http://localhost:9200"]

If you have configured a password for your elasticsearch, configure with this:

elasticsearch.username: "kibana_system"
elasticsearch.password: "pass"

If you do not have Elasticsearch installed, please check out this guide How to Install and Configure Elasticsearch on Ubuntu 20.04.

To apply the changes, you need to restart the kibana service:

sudo systemctl restart kibana

# 7. Accessing Kibana dashboard

Access the Kibana dashboard on your web browser at http://server-IP:5601. You can now configure your graphs and metrics.

Last updated on Mar 20, 2024 17:19 +0300
comments powered by Disqus
Citizix Ltd
Built with Hugo
Theme Stack designed by Jimmy