# Cluster elasticsearch port

**URL:** <https://discuss.elastic.co/t/cluster-elasticsearch-port/313866>\
**Category:** Elasticsearch\
**Created:** [September 7, 2022, 9:02am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866 "2022-09-07T09:02:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegz](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@diegz](https://discuss.elastic.co/u/diegz)\
**Post date:** [September 7, 2022, 9:02am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/1 "2022-09-07T09:02:33Z")

</div>

Hello,  
I want to set up a 3-node elasticsearch cluster in production.  
2 nodes master & data and one voting-only or data.  
I would like to know if I can assign a single port per node and not a range.  
For example : node1 port 9201 and 9301  
node2 port 9202 and 9302  
node3 port 9203 and 9303

It's possible?  
Does it interfer the communication between nodes in cluster? Does it facilitate their discovery?  
What are the best practices for this?

Best regards,

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 7, 2022, 9:03am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/2 "2022-09-07T09:03:34Z")

</div>

You can do this, but you will need to manually configure each ip/hostname and port.

Why do you want to do this though?

---

<div class="post-metadata">

**Author:** ![diegz](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@diegz](https://discuss.elastic.co/u/diegz)\
**Post date:** [September 7, 2022, 9:23am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/3 "2022-09-07T09:23:47Z")

</div>

To have only the necessary ports open and better identify them.  
Does this complicate the configuration?  
Do you have any recommendations?

Thank you for your answer @warkolm

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 7, 2022, 9:27am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/4 "2022-09-07T09:27:42Z")

</div>

I would just use the standards, then you only have 2 ports to worry about.

---

<div class="post-metadata">

**Author:** ![diegz](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@diegz](https://discuss.elastic.co/u/diegz)\
**Post date:** [September 7, 2022, 9:59am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/5 "2022-09-07T09:59:58Z")

</div>

Okay, thanks for the advice @warkolm  
Another question is it interesting to have 2 logstash servers with each one a pipeline if the number of logs to process is important?  
Should the port be different on both servers?  
logstash1 9601, logstash2 9602

And can kibana be present at the same time as elasticsearch on node3 for example which is a data node?

Thanks again

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 7, 2022, 10:04am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/6 "2022-09-07T10:04:08Z")

</div>

There's really no reason to change the port numbers unless you are being forced to do so, or you are running multiple instances of something on the same host.

---

<div class="post-metadata">

**Author:** ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)\
**Post date:** [September 8, 2022, 11:00am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/7 "2022-09-08T11:00:57Z")

</div>

There is a reason: everybody knows that ES uses 9200. My cluster uses other ports - above 10000. Same port for every ES node in cluster.

My firewall accepts incoming traffic only from ip of my nodes with specific ports. Same I did with my Kibana, Filebeat, Logstash, etc. - not even one of them uses the default port.

---

<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 6, 2022, 11:01am UTC](https://discuss.elastic.co/t/cluster-elasticsearch-port/313866/8 "2022-10-06T11:01:28Z")

</div>

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