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:

  1. Launch terminal.
  2. 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
  3. 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
  4. 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.
  5. 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
  6. Allow network access to port 5601 for Kibana.
    $ sudo ufw allow 5601
    Rules updated
    Rules updated (v6)
  7. Open the Kibana configuration file with your preferred text editor.
    $ sudo vi /etc/kibana/kibana.yml
  8. Uncomment and set the server.host in the configuration file to allow remote access.
    server.host: "0.0.0.0" 
  9. Uncomment elasticsearch.hosts and specify the Elasticsearch instance for Kibana to connect to.
    elasticsearch.hosts: ["http://127.0.0.1:9200"] 
  10. 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.
  11. Start Kibana service.
     $ sudo systemctl start kibana
  12. 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
Discuss the article:

Comment anonymously. Login not required.