Install Kibana with Debian package

edit

Install Kibana with Debian package

edit

The Debian package for Kibana can be downloaded from our website or from our APT repository. It can be used to install Kibana on any Debian-based system such as Debian and Ubuntu.

This package contains both free and subscription features. Start a 30-day trial to try out all of the features.

The latest stable version of Kibana can be found on the Download Kibana page. Other versions can be found on the Past Releases page.

Import the Elastic PGP key

edit

We sign all of our packages with the Elastic Signing Key (PGP key D88E42B4, available from https://pgp.mit.edu) with fingerprint:

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

Download and install the public signing key:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg

Install from the APT repository

edit

You may need to install the apt-transport-https package on Debian before proceeding:

sudo apt-get install apt-transport-https

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

echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list

Do not use add-apt-repository as it will add a deb-src entry as well, but we do not provide a source package. If you have added the deb-src entry, you will see an error like the following:

Unable to find expected entry 'main/source/Sources' in Release file
(Wrong sources.list entry or malformed file)

Delete the deb-src entry from the /etc/apt/sources.list file and the installation should work as expected.

You can install the Kibana Debian package with:

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

If two entries exist for the same Kibana repository, you will see an error like this during apt-get update:

Duplicate sources.list entry https://artifacts.elastic.co/packages/8.x/apt/ ...`

Examine /etc/apt/sources.list.d/kibana-8.x.list for the duplicate entry or locate the duplicate entry amongst the files in /etc/apt/sources.list.d/ and the /etc/apt/sources.list file.

Download and install the Debian package manually

edit

The Debian package for Kibana v8.6.2 can be downloaded from the website and installed as follows:

wget https://artifacts.elastic.co/downloads/kibana/kibana-8.6.2-amd64.deb
shasum -a 512 kibana-8.6.2-amd64.deb 
sudo dpkg -i kibana-8.6.2-amd64.deb

Compare the SHA produced by shasum with the published SHA.

Start Elasticsearch and generate an enrollment token for Kibana

edit

When you start Elasticsearch for the first time, the following security configuration occurs automatically:

  • Authentication and authorization are enabled, and a password is generated for the elastic built-in superuser.
  • Certificates and keys for TLS are generated for the transport and HTTP layer, and TLS is enabled and configured with these keys and certificates.

The password and certificate and keys are output to your terminal.

You can then generate an enrollment token for Kibana with the elasticsearch-create-enrollment-token tool:

bin/elasticsearch-create-enrollment-token -s kibana

Start Kibana and enter the enrollment token to securely connect Kibana with Elasticsearch.

Run Kibana with systemd

edit

To configure Kibana to start automatically when the system starts, run the following commands:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable kibana.service

Kibana can be started and stopped as follows:

sudo systemctl start kibana.service
sudo systemctl stop kibana.service

These commands provide no feedback as to whether Kibana was started successfully or not. Log information can be accessed via journalctl -u kibana.service.

Configure Kibana via the config file

edit

Kibana loads its configuration from the /etc/kibana/kibana.yml file by default. The format of this config file is explained in Configuring Kibana.

Directory layout of Debian package

edit

The Debian package places config files, logs, and the data directory in the appropriate locations for a Debian-based system:

Type Description Default Location Setting

home

Kibana home directory or $KIBANA_HOME

/usr/share/kibana

bin

Binary scripts including kibana to start the Kibana server and kibana-plugin to install plugins

/usr/share/kibana/bin

config

Configuration files including kibana.yml

/etc/kibana

KBN_PATH_CONF

data

The location of the data files written to disk by Kibana and its plugins

/var/lib/kibana

path.data

logs

Logs files location

/var/log/kibana

path.logs

plugins

Plugin files location. Each plugin will be contained in a subdirectory.

/usr/share/kibana/plugins