Install Kibana with Debian package
The Debian package for Kibana can bedownloaded from our website or from ourAPT 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 theDownload Kibana page. Other versions can be found on thePast Releases page.
We sign all of our packages with the Elasticsearch signing key (PGP keyD88E42B4, available fromhttps://pgp.mit.edu
4609 5ACC 8548 582C 1A26 99A9 D27D 666C D88E 42B4Download and install the public signing key:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpgYou have several options for installing the Elasticsearch Debian package:
You may need to install the
apt-transport-httpspackage on Debian before proceeding:sudo apt-get install apt-transport-httpsSave 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/9.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-9.x.listInstall the Kibana Debian package:
sudo apt-get update && sudo apt-get install kibana
Do not useadd-apt-repository as it will add adeb-src entry as well, but we do not provide a source package. If you have added thedeb-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 thedeb-src entry from the/etc/apt/sources.list file and the installation should work as expected.
If two entries exist for the same Kibana repository, you will see an error like this duringapt-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.3.0 can be downloaded from the website and installed as follows:
To download and install the Kibana 9.3.0 package, enter:
wget https://artifacts.elastic.co/downloads/kibana/kibana-9.3.0-amd64.debshasum -a 512 kibana-9.3.0-amd64.debsudo dpkg -i kibana-9.3.0-amd64.deb- Compare the SHA produced by shasum with thepublished SHA.
Because Kibana is an Elastic Stack product, you must install the same version number as the rest of your Elastic Stack components. Replace<SPECIFIC.VERSION.NUMBER> with the version that's used across your entire stack. For example, you can use 9.0.0.
wget https://artifacts.elastic.co/downloads/kibana/kibana-<SPECIFIC.VERSION.NUMBER>-amd64.debshasum -a 512 kibana-<SPECIFIC.VERSION.NUMBER>-amd64.debsudo dpkg -i kibana-<SPECIFIC.VERSION.NUMBER>-amd64.deb- Compare the SHA produced by shasum with thepublished SHA.
When you start your first Elasticsearch node for the first time, it automatically performs the following security setup:
- GeneratesTLS certificates for thetransport and HTTP layers
- Applies TLS configuration settings to
elasticsearch.yml - Sets a password for the
elasticsuperuser - Creates an enrollment token to securely connect Kibana to Elasticsearch
You can then start Kibana and enter the enrollment token, which is valid for 30 minutes. This token automatically applies the security settings from your Elasticsearch cluster, authenticates to Elasticsearch with the built-inkibana service account, and writes the security configuration tokibana.yml.
There aresome 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 theelasticsearch-create-enrollment-token tool:
bin/elasticsearch-create-enrollment-token -s kibanaThe default host and port settings configure Kibana to run on localhost:5601. To change this behavior and allow remote users to connect, you need to set up Kibana to run on a routable, external IP address. You can do this by editing the settings inkibana.yml:
Open
kibana.ymlin a text editor.Uncomment the line
#server.host: localhostand replace the default address with0.0.0.0. The0.0.0.0setting enables Kibana to listen for connections on all available network interfaces. In a production environment, you might want touse a different value, such as a static IP address.server.host: 0.0.0.0Save your changes and close the editor.
To configure Kibana to start automatically when the system starts, run the following commands:
sudo /bin/systemctl daemon-reloadsudo /bin/systemctl enable kibana.serviceKibana can be started and stopped as follows:
sudo systemctl start kibana.servicesudo systemctl stop kibana.serviceThese commands provide no feedback as to whether Kibana was started successfully or not. Log information can be accessed usingjournalctl -u kibana.service.
Run the
statuscommand to get details about the Kibana service.sudo systemctl status kibanaIn the
statuscommand 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.
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.
When Kibana starts, you’re prompted to provide an enrollment token. Paste in the Kibana enrollment token that you generated earlier.
ClickConfigure Elastic.
If you’re prompted to provide a verification code, copy and paste in the six digit code that was returned by the
statuscommand. Then, wait for the setup to complete.When you see theWelcome to Elastic page, provide the
elasticas the username and provide the password that you copied from the install command output when you set up your first Elasticsearch node.ClickLog in.
Kibana loads its configuration from the/etc/kibana/kibana.yml file by default. The format of this config file is explained inConfigure Kibana.
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 includingkibana to start the Kibana server andkibana-plugin to install plugins | /usr/share/kibana/bin | |
| config | Configuration files includingkibana.yml | /etc/kibana | [KBN_PATH_CONF](configure-kibana.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 |
You now have a basic Kibana instance set up. Consider the following next steps:
- Learn how toconfigure Kibana.
- Learn how toaccess Kibana.
- Explorekey configuration topics to learn how to secure and manage Kibana.