Installing Logstashedit

Logstash requires Java 8. Java 9 is not supported. Use the official Oracle distribution or an open-source distribution such as OpenJDK.

To check your Java version, run the following command:

java -version

On systems with Java installed, this command produces output similar to the following:

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Installing from a Downloaded Binaryedit

Download the Logstash installation file that matches your host environment. Unpack the file. Do not install Logstash into a directory path that contains colon (:) characters.

On supported Linux operating systems, you can use a package manager to install Logstash.

Installing from Package Repositoriesedit

We also have repositories available for APT and YUM based distributions. Note that we only provide binary packages, but no source packages, as the packages are created as part of the Logstash build.

We have split the Logstash package repositories by version into separate urls to avoid accidental upgrades across major versions. For all 5.x.y releases use 5.x as version number.

We use the PGP key D88E42B4, Elastic’s Signing Key, with fingerprint

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

to sign all our packages. It is available from


Download and install the Public Signing Key:

wget -qO - | sudo apt-key add -

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-5.x.list:

echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list

Use the echo method described above to add the Logstash repository. 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)

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

Run sudo apt-get update and the repository is ready for use. You can install it with:

sudo apt-get update && sudo apt-get install logstash

See Running Logstash for details about managing Logstash as a system service.


Download and install the public signing key:

rpm --import

Add the following in your /etc/yum.repos.d/ directory in a file with a .repo suffix, for example logstash.repo

name=Elastic repository for 5.x packages

And your repository is ready for use. You can install it with:

sudo yum install logstash

The repositories do not work with older rpm based distributions that still use RPM v3, like CentOS5.

See the Running Logstash document for managing Logstash as a system service.


An image is available for running Logstash as a Docker container. It is available from the Elastic Docker registry. See Running Logstash on Docker for details on how to configure and run Logstash Docker containers.