sherifabdlnaby / elastdocker

🐳 Elastic Stack (ELK) v8+ on Docker with Compose. Pre-configured out of the box to enable Logging, Metrics, APM, Alerting, ML, and SIEM features. Up with a Single Command.
https://towardsdatascience.com/running-securing-and-deploying-elastic-stack-on-docker-f1a8ebf1dc5b
MIT License
1.81k stars 320 forks source link

how to reset the password of a running stack #71

Closed nikolinsko closed 2 years ago

nikolinsko commented 2 years ago

Hi there,

this might be a pretty dumb question but how do i change the password of an existing cluster?

i tried editing the .env file followed by make setup and

My service is public facing and i messed the initial password up ;)

Thanks in advance

sherifabdlnaby commented 2 years ago

@nikolinsko You can use the Change Password API. Or the Utility Tools inside the container (by exec'ing inside).

Another way would be to expose the password you want as an environment variable via export ELASTIC_PASSWORD=<password>, then run make setup, this should replace your existing ./secrets/keystore/elasticsearch.keystore file that holds your bootstrap.password.

nikolinsko commented 2 years ago

thanks alot, i'll give it a try.

Closing this now :)