- Clone the this repository:
git clone https://github.com/mpolinowski/elk-server-compose.git
- Build and Run:
docker-compose build
docker-compose up
- Create Random User Logins
Now I can connect to the running Elasticsearch container and generate random passwords for both the elastic
and kibana_system
user:
docker-compose exec -T elasticsearch bin/elasticsearch-reset-password --batch --user elastic
docker-compose exec -T elasticsearch bin/elasticsearch-reset-password --batch --user kibana_system
- Replace Kibana User Login
Replace the password of the kibana_system
user inside the Kibana configuration file with the password generated in the previous step:
kibana/config/kibana.yml
elasticsearch.username: kibana_system
elasticsearch.password: 'mygeneratedpassword'
And change the ELASTIC_PASSWORD environment variable from the elasticsearch service inside the Compose file docker-compose.yml
.:
ELASTIC_PASSWORD: 'mygeneratedpassword'
- Restart and Start Using Elasticsearch / Kibana