# Need help setting up a second node

**URL:** <https://discuss.elastic.co/t/need-help-setting-up-a-second-node/375785>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [March 12, 2025, 2:14pm UTC](https://discuss.elastic.co/t/need-help-setting-up-a-second-node/375785 "2025-03-12T14:14:59Z")\
**Posts on this page:** 1\
**Showing post:** 18

<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:** [March 25, 2025, 1:50pm UTC](https://discuss.elastic.co/t/need-help-setting-up-a-second-node/375785/18 "2025-03-25T13:50:30Z")

</div>

Think I found it....

> [@How does one setup a clustered elasticsearch?](https://discuss.elastic.co/t/how-does-one-setup-a-clustered-elasticsearch/190017/2):
>
> Solved! for anyone who comes accross this, you have to match you pod name with the name in the cluster.initial\_master\_nodes: I did this by setting a static name in the NODE\_NAME in my deployment file and then in the config, node.name: ${NODE\_NAME}

The initial master nodes names needs to match exactly what is in the first elasticsearch.yml

I think this all comes from you initially manually setting the node name on the initial node which does not match the host name.

See [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html#modules-discovery-bootstrap-cluster-fqdns) for details from the docs

Try commenting out the node name in the first elasticsearch.yml ... In short, don't set the node name unless you really know what you're doing let that be done automatically

Restart The first node.

Then do a clean install and token on the second.

I should have seen / asked this earlier...

---

_[View the full topic](https://discuss.elastic.co/t/need-help-setting-up-a-second-node/375785)._
