Skip to main content
Elasticsearch ships as a Docker image, a tar.gz/zip archive, and native packages for Linux (Debian and RPM). All distributions bundle a compatible JDK — you do not need to install Java separately.
Elasticsearch bundles OpenJDK in every distribution. The bundled JDK is the recommended runtime. If you supply your own JDK via JAVA_HOME, make sure it meets the version requirements listed in the supported platforms matrix.

Docker

Docker is the fastest way to run a single-node Elasticsearch instance for local development or testing.
Setting discovery.type=single-node disables the production-mode bootstrap checks and is not suitable for production. A production cluster must use a multi-node configuration with proper discovery settings.
1

Pull the image

Replace 8.x with the target version (e.g., 8.17.0):
docker pull docker.elastic.co/elasticsearch/elasticsearch:8.x
2

Start a single-node container

docker run --name elasticsearch \
  -p 9200:9200 \
  -e "discovery.type=single-node" \
  -e "ELASTIC_PASSWORD=changeme" \
  -e "xpack.security.enabled=true" \
  docker.elastic.co/elasticsearch/elasticsearch:8.x
Environment variableDescription
discovery.type=single-nodeSkips multi-node discovery; required for a standalone container.
ELASTIC_PASSWORDPassword for the built-in elastic superuser. Must be at least 6 characters.
xpack.security.enabledEnables authentication and TLS. Set to false to disable (not recommended).
3

Verify the node is running

curl -u elastic:changeme http://localhost:9200
A successful response contains "tagline": "You Know, for Search".

Multi-node cluster with Docker Compose

For a three-node cluster with TLS enabled, use the example docker-compose.yml from the Elasticsearch repository. Copy both files to a working directory, fill in passwords in .env, then run:
docker compose up -d
The Compose file starts three Elasticsearch nodes (es01, es02, es03) and a Kibana instance. Each node has:
  • TLS certificates generated by elasticsearch-certutil
  • bootstrap.memory_lock=true to prevent heap from swapping
  • xpack.security.enabled=true with per-node certificate keypairs

Next steps

Quickstart

Index a document and run your first search query.

Configuration

Configure node roles, memory, network settings, and more.

Security

Set up TLS, user authentication, and role-based access control.

Core concepts

Learn about indices, shards, nodes, and cluster architecture.

Build docs developers (and LLMs) love