# Elasticsearch Basic Security Setup

**URL:** <https://discuss.elastic.co/t/elasticsearch-basic-security-setup/203011>\
**Category:** Elasticsearch\
**Created:** [October 10, 2019, 11:42am UTC](https://discuss.elastic.co/t/elasticsearch-basic-security-setup/203011 "2019-10-10T11:42:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [October 10, 2019, 11:42am UTC](https://discuss.elastic.co/t/elasticsearch-basic-security-setup/203011/1 "2019-10-10T11:42:03Z")

</div>

Hello,

I want to setup basic security in multi node cluster  
what should be

discovery.type: single-node  
for a multi node cluster

Since when i used a single node cluster my configuration was  
xpack.security.enabled: true  
discovery.type: single-node

what should we use for multi nodes

I am having a testing 2 node cluster  
1 master node and 2 data nodes

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [October 10, 2019, 1:51pm UTC](https://discuss.elastic.co/t/elasticsearch-basic-security-setup/203011/2 "2019-10-10T13:51:32Z")

</div>

Do not use

```auto
discovery.type

```

and set

```auto
xpack.security.enabled: true

```

to all nodes

---

<div class="post-metadata">

**Author:** ![shrikantgulia](https://avatars.discourse-cdn.com/v4/letter/s/c68b51/32.png) [@shrikantgulia](https://discuss.elastic.co/u/shrikantgulia)\
**Post date:** [October 11, 2019, 7:34am UTC](https://discuss.elastic.co/t/elasticsearch-basic-security-setup/203011/3 "2019-10-11T07:34:50Z")

</div>

Hey @ikakavas  
Thankyou for the response but my node is not starting when i am setting up

xpack.security.enabled: true

both nodes arent starting  
my config file i.e elasticsearch.yml is

cluster.name: test-master  
node.master: true  
node.data: true  
node.ingest: true  
node.name: masternode  
network.host: 0.0.0.0  
discovery.seed\_hosts: ["IP1", "IP2"]  
cluster.initial\_master\_nodes: ["masternode"]  
xpack.security.enabled: true

and 2nd config is

cluster.name: test-master  
node.master: false  
node.data: true  
node.ingest: true  
node.name: datanode  
network.host: 0.0.0.0  
discovery.seed\_hosts: ["IP1", "IP2"]  
cluster.initial\_master\_nodes: ["masternode"]  
xpack.security.enabled: true

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [October 11, 2019, 8:08am UTC](https://discuss.elastic.co/t/elasticsearch-basic-security-setup/203011/4 "2019-10-11T08:08:15Z")

</div>

Please read through our documentation: [Configure security in Elasticsearch | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-security.html)

If you have any specific problems we can assist, but it's of little use repeating the docs here.

For future reference:

> both nodes arent starting

doesn't allow anyone to provide any meaningful help. For future issues you might have, you need to also add the exact error message and the logs.

For now, reading through the documentation will help you get going

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 8, 2019, 8:08am UTC](https://discuss.elastic.co/t/elasticsearch-basic-security-setup/203011/5 "2019-11-08T08:08:18Z")

</div>

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