Adam Matan
Adam Matan

Reputation: 136449

How to disable security (username/password) on Elasticsearch Docker container?

I would like to run the Dockerized version of Elasticsearch without username/password based security (I use other means, like AWS security groups).

How do I disable username/password security in Elasticsearch Docker?

Upvotes: 21

Views: 20687

Answers (2)

vineet
vineet

Reputation: 964

Remember to set this 👇 env, to run ElasticSearch in non-production mode

       -e "discovery.type=single-node" \

Upvotes: -1

Adam Matan
Adam Matan

Reputation: 136449

Docker

Simply add the xpack.security.enabled=false env var:

docker run \
       -p 9200:9200 \
       -p 9300:9300 \
       -e "discovery.type=single-node" \
       -e "xpack.security.enabled=false" \
       docker.elastic.co/elasticsearch/elasticsearch:5.6.3

Ansible

When running the container using Ansible's docker_container, some yaml idiosyncrasies forces you to use 0 instead of false:

env:
  discovery.type: "single-node"
  xpack.security.enabled: 0
  ..

Upvotes: 47

Related Questions