# Changing the cluster name

**URL:** https://discuss.elastic.co/t/changing-the-cluster-name/94626
**Category:** Elasticsearch
**Created:** [July 26, 2017, 11:25am UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626 "2017-07-26T11:25:50Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mruthyu](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mruthyu](https://discuss.elastic.co/u/mruthyu)
#### Post date: [July 26, 2017, 11:25am UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626/1 "2017-07-26T11:25:50Z")

</div>

Elasticsearch version: 5.4.3

I have a single node elasticsearch server and already have few millions of documents indexed. I want to add another node and want to have it as two nodes cluster. While doing so I want to change the cluster name. Let me know is there any implication of changing the cluster name and the precautions needs to be taken.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 26, 2017, 12:08pm UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626/2 "2017-07-26T12:08:11Z")

</div>

Yes you can change the cluster name.

I just tested locally that running `bin/elasticsearch -Ecluster.name=foo` still works and you can still have access to your data.

I'd do this in two steps though:

1. Update the cluster name, restart node1
2. Check
3. Start a new node using that cluster name as well.

---

<div class="post-metadata">

### Author: ![mruthyu](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mruthyu](https://discuss.elastic.co/u/mruthyu)
#### Post date: [July 26, 2017, 2:02pm UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626/3 "2017-07-26T14:02:21Z")

</div>

Great. Thanks David for your quick reply.

---

<div class="post-metadata">

### Author: ![mruthyu](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mruthyu](https://discuss.elastic.co/u/mruthyu)
#### Post date: [July 28, 2017, 6:16am UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626/4 "2017-07-28T06:16:37Z")

</div>

Now I have another cluster where I have to change the cluster name. But it has more nodes - Master, Hot and warm nodes, Coordinating nodes including Kibana. So what should be the sequence in which the nodes needs to be restarted after the change in cluster name.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [July 28, 2017, 6:39am UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626/5 "2017-07-28T06:39:04Z")

</div>

If you want to change the cluster name, the best thing to do is a [full cluster restart](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/restart-upgrade.html).

---

<div class="post-metadata">

### Author: ![mruthyu](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mruthyu](https://discuss.elastic.co/u/mruthyu)
#### Post date: [July 28, 2017, 6:44am UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626/6 "2017-07-28T06:44:12Z")

</div>

Sure. Thanks.

---

<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: [August 25, 2017, 6:44am UTC](https://discuss.elastic.co/t/changing-the-cluster-name/94626/7 "2017-08-25T06:44:29Z")

</div>

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