# Change node hostname

**URL:** <https://discuss.elastic.co/t/change-node-hostname/338312>\
**Category:** Elasticsearch\
**Created:** [July 13, 2023, 10:10am UTC](https://discuss.elastic.co/t/change-node-hostname/338312 "2023-07-13T10:10:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesar.hernandez.a3se](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cesar.hernandez.a3se](https://discuss.elastic.co/u/cesar.hernandez.a3se)\
**Post date:** [July 13, 2023, 10:10am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/1 "2023-07-13T10:10:43Z")

</div>

Hi

We have a 7 node ES cluster (v7.17.5) and we need to change the hostnames of all nodes. I know how to do it on Linux, but, is there anything I need to change on Elasticsearch?

My elasticsearch.yml uses ip address (not hostnames), and we are not changing ips. For example:

discovery.seed\_hosts: ["10.57.40.167",  
"10.57.40.168",  
"10.57.40.169",  
"10.57.40.136",  
"10.57.40.137"]

But I see now two parameters which do use node name:

xpack.security.transport.ssl.keystore.path: certs/${node.name}.p12  
xpack.security.transport.ssl.truststore.path: certs/${node.name}.p12

Thanks

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [July 13, 2023, 12:41pm UTC](https://discuss.elastic.co/t/change-node-hostname/338312/2 "2023-07-13T12:41:22Z")

</div>

> [@cesar.hernandez.a3se](#):
>
> xpack.security.transport.ssl.keystore.path: certs/${node.name}.p12  
> xpack.security.transport.ssl.truststore.path: certs/${node.name}.p12

This `${node.name}` can come from some automation tool used to create the configuration or it may be a variable in the elasticsearch keystore.

List the settings in the [keystore](https://www.elastic.co/guide/en/elasticsearch/reference/current/elasticsearch-keystore.html#list-settings) to see if you have something like this.

```auto
/usr/share/elasticsearch/bin/elasticsearch-keystore list

```

---

<div class="post-metadata">

**Author:** ![cesar.hernandez.a3se](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cesar.hernandez.a3se](https://discuss.elastic.co/u/cesar.hernandez.a3se)\
**Post date:** [July 14, 2023, 6:23am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/3 "2023-07-14T06:23:36Z")

</div>

Hi

The command returns:

# /usr/share/elasticsearch/bin/elasticsearch-keystore list

keystore.seed

But I'm not worried about that parameter, what I'm asking if I need to change something in the Elastic Cluster when I'm changing the system hostname...

Thanks

---

<div class="post-metadata">

**Author:** ![cesar.hernandez.a3se](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cesar.hernandez.a3se](https://discuss.elastic.co/u/cesar.hernandez.a3se)\
**Post date:** [July 20, 2023, 6:20am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/4 "2023-07-20T06:20:04Z")

</div>

Hi

Anyone else with some ideas about this issue?

Thanks

---

<div class="post-metadata">

**Author:** ![cesar.hernandez.a3se](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cesar.hernandez.a3se](https://discuss.elastic.co/u/cesar.hernandez.a3se)\
**Post date:** [July 31, 2023, 6:32am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/5 "2023-07-31T06:32:08Z")

</div>

Hi there

Anyone else with some ideas about this issue?

Thanks

---

<div class="post-metadata">

**Author:** ![cesar.hernandez.a3se](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cesar.hernandez.a3se](https://discuss.elastic.co/u/cesar.hernandez.a3se)\
**Post date:** [August 16, 2023, 6:37am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/6 "2023-08-16T06:37:33Z")

</div>

Hi

Any ideas out there?

Thanks

---

<div class="post-metadata">

**Author:** ![cesar.hernandez.a3se](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@cesar.hernandez.a3se](https://discuss.elastic.co/u/cesar.hernandez.a3se)\
**Post date:** [September 5, 2023, 6:35am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/7 "2023-09-05T06:35:38Z")

</div>

Hi everyone.

Can anyone help me with this issue?

Thanks

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 29, 2023, 3:19am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/8 "2023-09-29T03:19:50Z")

</div>

> [@cesar.hernandez.a3se](#):
>
> But I'm not worried about that parameter, what I'm asking if I need to change something in the Elastic Cluster when I'm changing the system hostname...

The system hostname is only used if you do not set the `node.name` in `elasticsearch.yml`, if you have set it, then it is irrelevant what is the hostname.

Also, the node name is just a human-readable identifier of the node, to know which node is which the uuid generated when started the node for the first time is used.

---

<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:** [October 27, 2023, 3:20am UTC](https://discuss.elastic.co/t/change-node-hostname/338312/9 "2023-10-27T03:20:05Z")

</div>

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