# Custom TCP port numbers instead of 9200 for elasticsearch

**URL:** <https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012>\
**Category:** Elasticsearch\
**Created:** [August 17, 2023, 12:31pm UTC](https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012 "2023-08-17T12:31:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Penchala\_Abhilash\_Mu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/penchala_abhilash_mu/32/124383_2.png) [@Penchala\_Abhilash\_Mu](https://discuss.elastic.co/u/Penchala_Abhilash_Mu)\
**Post date:** [August 17, 2023, 12:31pm UTC](https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012/1 "2023-08-17T12:31:49Z")

</div>

Hi Team,  
As a security best practices, i would like to change the http.port number from 9200 to custom tcp port number.?? Please share the some reference documents

Best Reagards,  
Abhilash

---

<div class="post-metadata">

**Author:** ![Penchala\_Abhilash\_Mu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/penchala_abhilash_mu/32/124383_2.png) [@Penchala\_Abhilash\_Mu](https://discuss.elastic.co/u/Penchala_Abhilash_Mu)\
**Post date:** [August 17, 2023, 12:32pm UTC](https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012/2 "2023-08-17T12:32:33Z")

</div>

Team, Please let me know if any more help is needed on this query??

---

<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:** [August 17, 2023, 1:10pm UTC](https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012/3 "2023-08-17T13:10:50Z")

</div>

This is in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#modules-network), you just need to change the value of `http.port` on your `elasticsearch.yml` and restart elasticsearch.

---

<div class="post-metadata">

**Author:** ![Penchala\_Abhilash\_Mu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/penchala_abhilash_mu/32/124383_2.png) [@Penchala\_Abhilash\_Mu](https://discuss.elastic.co/u/Penchala_Abhilash_Mu)\
**Post date:** [August 18, 2023, 4:49am UTC](https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012/4 "2023-08-18T04:49:44Z")

</div>

Thanks Leandro Pereira for the information, let me reproduce it in my local by the way Please don't close the discussion. more over any TCP PORT RANGE can only used customised (i'm planning to use 2000-3000 of TCP) hence double checking with you.

More over "server.port: 5601" of kibana can we change to 443 or some other custom port.

We are currently running 8.9.X latest version of ESK cluster.

---

<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 18, 2023, 5:12am UTC](https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012/5 "2023-08-18T05:12:06Z")

</div>

Hi @Penchala_Abhilash_Mu

Discussion close automatically after a certain period of inactivity.

Elasticsearch and Kibana ports are configurable per the documentation you can set them as you please to any reasonable port.

443 is fine for Kibana  
As well as Elasticsearch HTTP/S interface  
The Elasticsearch transport interface just needs to be run on a different port than the HTTP/S interface.

---

<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:** [September 15, 2023, 5:12am UTC](https://discuss.elastic.co/t/custom-tcp-port-numbers-instead-of-9200-for-elasticsearch/341012/6 "2023-09-15T05:12:50Z")

</div>

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