How to run Elasticsearch 2.1.1 as root user in Linux machine How to run Elasticsearch 2.1.1 as root user in Linux machine elasticsearch elasticsearch

How to run Elasticsearch 2.1.1 as root user in Linux machine


Based of the following code-snippet looks like you should be able to achieve this by enabling property es.insecure.allow.root

Example :

bin/elasticsearch -Des.insecure.allow.root=true


  1. Open script file:

    vi bin/elasticsearch

  2. Add property for allow root:

    ES_JAVA_OPTS="-Des.insecure.allow.root=true"

  3. Save and close.
  4. You can start by root now.

Good luck.


You can also create alias

alias elasticsearch='elasticsearch -Des.insecure.allow.root=true'

Add above line in bashrc file, After that elasticsearch command will work.