Set Elastic Password during deployment

I am new to Elasticsearch and setting it up with an script. I am going through the documentation and can see that for docker installation, one can specify a password for the elastic user in the docker-compose file with something like:


I am not deploying on docker. I am deploying on an ec2 instance using a script. How can I achieve this? I want to be able to specify a password for the elastic and kibana user.

Also, while sending logs from logstash to elasticsearch as output, which username and password would I have to specify in my logstash configuration?

The created logstash username and password, or the elastic user username and password?

Welcome to our community! :smiley:

Are you using a deb/rpm repo or package?

You should create a specific one, and not use the elastic superuser.

I am using deb. When you say I should create a specific one; do you mean creating users?

You can set the password using the method described here - Automate Elasticsearch-reset-password in bash script - #5 by Chma


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