Based on the Anthony Lapenna's docker-elk repository.
- Initialize the Elasticsearch users and groups required by executing the command:
docker-compose up setup
- Start the stack components:
docker-compose up [-d]
Give Kibana about a minute to initialize, then access the Kibana web UI by opening http://localhost:5601 in a web browser and use the following (default) credentials to log in: elastic/password
Note
Upon the initial startup, the elastic
, logstash_internal
and kibana_system
Elasticsearch users are intialized
with the values of the passwords defined in the .env
file ("password" by default). The first one is the
built-in superuser, the other two are used by Kibana and Logstash respectively to communicate with
Elasticsearch.
By default, the stack exposes the following ports:
- 50000: Logstash TCP input
- 9600: Logstash monitoring API
- 9200: Elasticsearch HTTP
- 9300: Elasticsearch TCP transport
- 5601: Kibana
Important
Configuration is not dynamically reloaded, you will need to restart individual components after any configuration change.
The Elasticsearch configuration is stored in elasticsearch/config/elasticsearch.yml
.
You can also specify the options you want to override by setting environment variables inside the Compose file:
elasticsearch:
environment:
network.host: _non_loopback_
cluster.name: my-cluster
Please refer to the following documentation page for more details about how to configure Elasticsearch inside Docker containers: Install Elasticsearch with Docker.
The Kibana default configuration is stored in kibana/config/kibana.yml
.
You can also specify the options you want to override by setting environment variables inside the Compose file:
kibana:
environment:
SERVER_NAME: kibana.example.org
Please refer to the following documentation page for more details about how to configure Kibana inside Docker containers: Install Kibana with Docker.
The Logstash configuration is stored in logstash/config/logstash.yml
.
You can also specify the options you want to override by setting environment variables inside the Compose file:
logstash:
environment:
LOG_LEVEL: debug
Please refer to the following documentation page for more details about how to configure Logstash inside Docker containers: Configuring Logstash for Docker.