Creating password to default users

Hey gurus!

I want to automate the process of my docker installation.
I don't want to setup an elasticsearch instance to run docker exec elasticsearch-1 /bin/bash -c "bin/elasticsearch-setup-passwords auto --batch --url https://loaclhost:9200" after to get, ie, kibana_system password and then run kibana docker.

How can I use the elasticsearch-setup-passowords in a docker-compose file ? Or maybe I need to use elasticsearch-keystore create the echo $PASS| elasticsearch-keystore add -x username

Cheers,

Antonio Marques

Don't use setup-passwords at all.

You don't need it. Just authenticate with your Docker bootstrap password (ELASTIC_PASSWORD) and then use the Change password API to set permanent passwords for the elastic and kibana_system users.

1 Like

Thanks @TimV
I did a search and found some examples here on how to use ELASTIC_PASSWORD and works!..

The only problem I saw is that all other apps will use elastic as user (kibana and fluentd). For me that's not a big problem because EFK are inside the VPC without a public IP.

How can we workaround this ? I mean user kibana_system to kibana, a fluent user to fluentd...

Regards,
Antonio Marques

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.