Elastic provides an apt repository for installing Kibana on Ubuntu, Debian, or any other distribution that uses the apt package manager. This repository ensures that the installation is kept up to date with the latest stable releases of Kibana, a core component of the Elastic Stack.
To install Kibana, you will need to add the official Elastic repository to your system’s apt sources list. After adding the repository, Kibana can be installed through the command line using the apt package manager, ensuring easy installation and updates.
Once installed, Kibana must be configured to work with an Elasticsearch instance, and remote access can be enabled by adjusting the configuration files. Network access to Kibana must also be opened, as it runs on port 5601 by default.
Steps to install Kibana on Ubuntu or Debian:
- Launch terminal.
- Add the ELK repository to the apt sources list.
$ echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list deb https://artifacts.elastic.co/packages/7.x/apt stable main [sudo] password for user: deb https://artifacts.elastic.co/packages/7.x/apt stable main
- Import the GPG key for the Elastic repository.
$ wget --quiet --output-document=- https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor | sudo tee /usr/share/keyrings/elasticsearch-archive-keyring.gpg
- Update the package list from the added repository.
$ sudo apt update Hit:1 https://artifacts.elastic.co/packages/7.x/apt stable InRelease Hit:2 http://archive.ubuntu.com/ubuntu hirsute InRelease Get:3 http://security.ubuntu.com/ubuntu hirsute-security InRelease [101 kB] Get:4 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB] Hit:5 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease Fetched 209 kB in 1s (157 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done All packages are up to date.
- Install the Kibana package using apt.
$ sudo apt install --assume-yes kibana Reading package lists... Done Building dependency tree... Done Reading state information... Done The following NEW packages will be installed: kibana 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 285 MB of archives. After this operation, 723 MB of additional disk space will be used. ##### snipped
- Allow network access to port 5601 for Kibana.
$ sudo ufw allow 5601 Rules updated Rules updated (v6)
- Open the Kibana configuration file with your preferred text editor.
$ sudo vi /etc/kibana/kibana.yml
- Uncomment and set the server.host in the configuration file to allow remote access.
server.host: "0.0.0.0"
- Uncomment elasticsearch.hosts and specify the Elasticsearch instance for Kibana to connect to.
elasticsearch.hosts: ["http://127.0.0.1:9200"]
- Enable Kibana to start on boot.
$ sudo systemctl enable kibana Synchronizing state of kibana.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable kibana Created symlink /etc/systemd/system/multi-user.target.wants/kibana.service → /etc/systemd/system/kibana.service.
- Start Kibana service.
$ sudo systemctl start kibana
- Open your browser to port 5601 on the Kibana host to access the Kibana dashboard.
$ curl -L 127.0.0.1:5601 <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/><meta name="viewport" content="width=device-width"/><title>Elastic</title><style> @font-face { font-family: 'Inter UI'; font-style: normal; font-weight: 100; src: url('/ui/fonts/inter_ui/Inter-UI-Thin-BETA.woff2') format('woff2'), url('/ui/fonts/inter_ui/Inter-UI-Thin-BETA.woff') format('woff'); } ##### snipped

Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.