This is a cache of https://www.elastic.co/search-labs/tutorials/install-elasticsearch/docker. It is a snapshot of the page at 2024-10-07T00:34:33.048+0000.
Docker — Search Labs

Docker

The most convenient option for local development and testing with elasticsearch is to use the official Docker image. The start-local script takes care of all the setup for you.

System requirements

Run the start-local script

For the purposes of this tutorial, a single node deployment of elasticsearch is sufficient. The start-local script will pull the latest version of elasticsearch and Kibana and start them in a Docker container.

Run the following command:

curl -fsSL https://elastic.co/start-local | sh

This script creates an elastic-start-local folder containing configuration files and starts both services. It also generates a .env file with important configuration details and credentials.

After running the script, you can access the services at the Elastic services at the following endpoints:

A random password is generated for the elastic user, stored in the .env file. An API key for elasticsearch is generated and stored in the .env file as ES_LOCAL_API_KEY.

Please remember that this setup is for local testing only. HTTPS is disabled, and Basic authentication is used for elasticsearch. For security, elasticsearch and Kibana are accessible only through localhost.

Further information

For detailed instructions on API keys, managing elasticsearch and Kibana services using Docker Compose, and other information, refer to the README in the elastic/start-local repository.

Trial license

The service is started with a trial license. The trial license enables all features, for a trial period of 30 days. After the trial period expires, the license reverts to a basic license, which is free forever. For a detailed feature comparison between the different licenses, refer to Elastic Stack subscriptions.

Self-Hosted Production Deployments

If you are interested in a self-hosted production deployment of elasticsearch, refer to the following links:

Share this article