# Elasticsearch cluster name in yml file

**URL:** https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643
**Category:** Elasticsearch
**Created:** [July 31, 2025, 10:15pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643 "2025-07-31T22:15:26Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![King\_storm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/king_storm/32/142011_2.png) [@King\_storm](https://discuss.elastic.co/u/King_storm)
#### Post date: [July 31, 2025, 10:15pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/1 "2025-07-31T22:15:26Z")

</div>

I have created a 3 node cluster. I have not mentioned cluster name or node name . It's using the default cluster name elasticsearch and node name of the Linux system. Initially I formed the cluster using the enrollment token,it doesn't work now gives me Unable to create token error. Now I want to add a new node manually. I know to make the yml changes same as other nodes. In the yaml added xpack.security.enrollment.enabled: false and  
xpack.security.autoconfiguration.enabled: false

I have also not mentioned cluster name and node name here. Will this approach be correct @stephenb

---

<div class="post-metadata">

### Author: ![King\_storm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/king_storm/32/142011_2.png) [@King\_storm](https://discuss.elastic.co/u/King_storm)
#### Post date: [July 31, 2025, 10:17pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/2 "2025-07-31T22:17:38Z")

</div>

Also even if I make the node name and cluster name change, how and what restart steps I should follow to avoid to break the cluster unmesscary. @stephenb

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [August 1, 2025, 2:55am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/3 "2025-08-01T02:55:24Z")

</div>

Hi @King_storm

1st Welcome to the community

2nd directly `@` people that are not already party of your topic already is poor forum etiquette.

Doing it multiple times not real good...

Please be patient

There are many questions and only a limited number of people to answer.

With respect to your question there is not enough information to answer...

If you want help please provide the elasticsearch.yml of one of the existing nodes that is working and the same for the new node...

Then perhaps someone can help

Also perhaps look at

> [@Unable to generate enrollment-token for new elasticsearch node](https://discuss.elastic.co/t/unable-to-generate-enrollment-token-for-new-elasticsearch-node/378234):
>
> When I use elasticsearch-create-enrollment-token -s node, to generate the token for enrol a new elastic node, I have the following error message: Unable to create enrollment token for scope [node] ERROR: Unable to create an enrollment token. Elasticsearch node HTTP layer SSL configuration Keystore doesn't contain any PrivateKey entries where the associated certificate is a CA certificate, with exit code 73 I see that there is this topic with the same issue: Anyway I use custom certificate, …

> [@Need help setting up a second node](https://discuss.elastic.co/t/need-help-setting-up-a-second-node/375785):
>
> Hello! I have a server with Elasticsearch, Kibana and a fleet-server agent installed. I use all the default certificates created in the beginning (automatic security configuration I believe it's called?). I would like to add a second server with Elasticsearch (a second node). I've tried using the enrollment token but it says it can't reach the node: Unable to communicate with the node on ://127.0.0.1:9200/\_security/enroll/node. Error was Connection refused ERROR: Aborting enrolling to clust…

---

<div class="post-metadata">

### Author: ![King\_storm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/king_storm/32/142011_2.png) [@King\_storm](https://discuss.elastic.co/u/King_storm)
#### Post date: [August 1, 2025, 8:09pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/4 "2025-08-01T20:09:48Z")

</div>

Hi, Please accept my apologies. It's my first time on a major forum.

Attaching below is my Elasticsearch node yml similar on all 3 nodes on my cluster.

```auto
#cluster.name: my-application

#node.name: node-1

node.roles: ["data","master","remote_cluster_client"] 

path.data: /es-data/elasticsearch 

path.logs: /opt/logs/elasticsearch 

network.host: 0.0.0.0 

http.port: 9200 

discovery.seed_hosts: ["<node-2>:9300","<node-3>:9300","<new-node>:9300"] 

xpack.security.enabled: true
 xpack.security.enrollment.enabled: true 

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents 

xpack.security.http.ssl: 

enabled: true 

verification_mode: none 

#keystore.path: certs/http.p12

key: certs/<company-signed>.key 

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt 

# Enable encryption and mutual authentication between cluster nodes 

xpack.security.transport.ssl:

enabled: true 

verification_mode: none 

#keystore.path: certs/transport.p12 

#truststore.path: certs/transport.p12 

key: certs/<company-signed>.key 

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt 

http.host: 0.0.0.0

transport.host: 0.0.0.0

```

And this is the Yaml of my new Agent node:

```auto

#cluster.name: my-application 

#node.name: node-1 

node.roles: ["data","master","remote_cluster_client"] 

path.data: /es-data/elasticsearch 

path.logs: /opt/logs/elasticsearch 

network.host: 0.0.0.0 

http.port: 9200 

discovery.seed_hosts: ["<node-2>:9300","<node-3>:9300","<node-1>:9300"] 

# Enable security features 

xpack.security.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents 

xpack.security.http.ssl:
 
enabled: true
 
verification_mode: none

#keystore.path: certs/http.p12

key: certs/<company-signed>.key

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt

#Enable encryption and mutual authentication between cluster nodes 

xpack.security.transport.ssl:

enabled: true 

verification_mode: none 

#keystore.path: certs/transport.p12

#truststore.path: certs/transport.p12 

key: certs/<company-signed>.key 

certificate: certs/<company-signed>.crt 

certificate_authorities: certs/<company-signed>.crt 

xpack.security.enrollment.enabled: false 

xpack.security.autoconfiguration.enabled: false 

http.host: 0.0.0.0

transport.host: 0.0.0.0

```

Read the first article and Skipped the enrollment token steps and decided to set up the node manually changing the Yaml

Please note I have not started my 4th node yet . Want to verify the Yaml first before starting the node. Also I want to know the process of restarting the nodes when I make a cluster name and node name change.

Do I shut off all nodes and restart one by one or change the cluster name on each node and restart it?

I'm using Version 8.17.0

Thanking the community for the help well in advance

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [August 2, 2025, 12:35am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/5 "2025-08-02T00:35:46Z")

</div>

When renaming a cluster requires full restart... Ie shut down entire cluster then start them... You can do 1 by one but you should be able to start them all and if properly configured the cluster will sort itself out

> [@How to change the cluster name of an elk cluster with 3 master nodes](https://discuss.elastic.co/t/how-to-change-the-cluster-name-of-an-elk-cluster-with-3-master-nodes/332564/2):
>
> That's correct, you will have to shut down all the nodes, adjust their config, and then start them all up again. Edit: I don't see this in the docs today so I opened [#95858](https://github.com/elastic/elasticsearch/pull/95858).

[Cluster Name Settings](https://www.elastic.co/guide/en/elasticsearch/reference/8.18/misc-cluster-settings.html#cluster-name)

---

<div class="post-metadata">

### Author: ![King\_storm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/king_storm/32/142011_2.png) [@King\_storm](https://discuss.elastic.co/u/King_storm)
#### Post date: [August 3, 2025, 5:56pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/6 "2025-08-03T17:56:03Z")

</div>

Thank you again. It worked. Now I have a Cluster of 4 nodes.

I restartedy 4th node and it joined successfully.

Final doubt is do I need to change anything in my yaml of the 4th new node i.e

```auto
xpack.security.enrollment.enabled: false 

xpack.security.autoconfiguration.enabled: false 

```

Is this fine as it is or can I completely remove it?

Thank you again for the Guidance and help

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [August 3, 2025, 10:12pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/7 "2025-08-03T22:12:15Z")

</div>

Technically now that the node is started I believe you can take them out... OTOH leaving them in does no harm and may remind you when you add another node what to do.

> **[Security settings in Elasticsearch | Reference](https://www.elastic.co/docs/reference/elasticsearch/configuration-reference/security-settings#general-security-settings)**
>
> You configure xpack.security settings to enable anonymous access and perform message authentication, set up document and field level security, configure...

Easy way to check...  
Take them out and restart the node and make sure it joins again

---

<div class="post-metadata">

### Author: ![King\_storm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/king_storm/32/142011_2.png) [@King\_storm](https://discuss.elastic.co/u/King_storm)
#### Post date: [August 4, 2025, 3:21pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-name-in-yml-file/380643/8 "2025-08-04T15:21:42Z")

</div>

Thanks @stephenb for the help and information. It helped a lot.
