Configure Username and password

How to configure the username and password while running elasticsearch in Docker without docker-compose.

You need to pass the ELASTIC_PASSWORD env variable.

Tried the following command :-
sudo docker run --name els01 -p 9200:9200 -e discovery.type=single-node -e ELASTICSEARCH_USERNAME=elastic -e ELASTICSEARCH_PASSWORD=12345 -it docker.elastic.co/elasticsearch/elasticsearch:8.6.2.

But it is giving ERROR:-
ERROR: Elasticsearch exited unexpectedly

Did I write ELASTICSEARCH_PASSWORD?

1 Like

Welcome to our community! :smiley:

See also Install Elasticsearch with Docker | Elasticsearch Guide [8.7] | Elastic

Yeah my bad, it's working thanks.
Also I had one more question.
Can we use python UDFs in kibana in order to transform the data queried from dev-tools console?

That's another question. Please open a new discussion in #elastic-stack:kibana as it's unrelated to the current thread.

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