Loading

Install Kibana with Debian package

Self Managed

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.

We sign all of our packages with the Elasticsearch 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

You have several options for installing the Elasticsearch Debian package:

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

    sudo apt-get install apt-transport-https
    
  2. Save the repository definition to /etc/apt/sources.list.d/elastic-9.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-9.x.list
    
  3. Install the Kibana Debian package:

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

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.

Warning

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/9.x/apt/ ...`

Examine /etc/apt/sources.list.d/kibana-9.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.

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

wget https://artifacts.elastic.co/downloads/kibana/kibana-9.0.0-amd64.deb
shasum -a 512 kibana-9.0.0-amd64.deb 1
sudo dpkg -i kibana-9.0.0-amd64.deb
  1. Compare the SHA produced by shasum with the published SHA.

Start Elasticsearch.

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

  • Certificates and keys for TLS are generated for the transport and HTTP layers.
  • The TLS configuration settings are written to elasticsearch.yml.
  • A password is generated for the elastic user.
  • An enrollment token is generated for Kibana, which is valid for 30 minutes.

You can then start Kibana and enter the enrollment token. This token automatically applies the security settings from your Elasticsearch cluster, authenticates to Elasticsearch with the built-in kibana service account, and writes the security configuration to kibana.yml.

Note

There are some cases where security can’t be configured automatically because the node startup process detects that the node is already part of a cluster, or that security is already configured or explicitly disabled.

If your enrollment token has expired, then you can generate a new enrollment token for Kibana with the elasticsearch-create-enrollment-token tool:

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

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 using journalctl -u kibana.service.

  1. Run the status command to get details about the {{{kib}}} service.

    sudo systemctl status kibana
    

    In the status command output, a URL is shown with:

    • A host address to access Kibana
    • A six digit verification code

    For example:

    Kibana has not been configured.
    Go to http://<host>:5601/?code=<code> to get started.
    

    Make a note of the verification code.

  2. Go to the host address.

    It can take a minute or two for Kibana to start up, so refresh the page if you don’t see a prompt right away.

  3. When Kibana starts, you’re prompted to provide an enrollment token. Paste in the Kibana enrollment token that you generated earlier.

  4. Click Configure Elastic.

  5. If you’re prompted to provide a verification code, copy and paste in the six digit code that was returned by the status command. Then, wait for the setup to complete.

  6. When you see the Welcome to Elastic page, provide the elastic as the username and provide the password that you copied from the install command output when you set up your first Elasticsearch node.

  7. Click Log in.

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

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](configure.md)
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 [Logging configuration](../../monitor/logging-configuration/kibana-logging.md)
plugins Plugin files location. Each plugin will be contained in a subdirectory. /usr/share/kibana/plugins