# Changing the published port

**URL:** https://discuss.elastic.co/t/changing-the-published-port/23203
**Category:** Elasticsearch
**Created:** [April 13, 2015, 3:06am UTC](https://discuss.elastic.co/t/changing-the-published-port/23203 "2015-04-13T03:06:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Vinicius\_Carvalho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinicius_carvalho/32/770_2.png) [@Vinicius\_Carvalho](https://discuss.elastic.co/u/Vinicius_Carvalho)
#### Post date: [April 13, 2015, 3:06am UTC](https://discuss.elastic.co/t/changing-the-published-port/23203/1 "2015-04-13T03:06:52Z")

</div>

Hi there, I'm trying to setup an ES infrastructure inside docker, and so  
far I was able to change the publish host from using docker's internal IP  
to use the HOST IP, but I have problems because the PORT used by the  
container 9300 does not map to the HOST port.

Is there a way to publish a different port than the one used by the server.  
I just need to publish the HOST IP and PORT as opposed to the container's

Regards

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/76bffb1d-33b7-4d15-a309-6967b25f2841%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/76bffb1d-33b7-4d15-a309-6967b25f2841%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Vinicius\_Carvalho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinicius_carvalho/32/770_2.png) [@Vinicius\_Carvalho](https://discuss.elastic.co/u/Vinicius_Carvalho)
#### Post date: [April 13, 2015, 7:44pm UTC](https://discuss.elastic.co/t/changing-the-published-port/23203/2 "2015-04-13T19:44:18Z")

</div>

I'm truly sorry for using a bump, but is there any chance I could hack  
this? I know for ES it does start on port 9300, but if I could just modify  
the exposed address I could get a nice cluster with docker without  
depending on hardcoding ports.

Thank you

On Sunday, April 12, 2015 at 11:06:52 PM UTC-4, Vinicius Carvalho wrote:

> Hi there, I'm trying to setup an ES infrastructure inside docker, and so  
> far I was able to change the publish host from using docker's internal IP  
> to use the HOST IP, but I have problems because the PORT used by the  
> container 9300 does not map to the HOST port.
> 
> Is there a way to publish a different port than the one used by the  
> server. I just need to publish the HOST IP and PORT as opposed to the  
> container's
> 
> Regards

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b02d0def-b561-41e5-b43f-4bbceb8d3368%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b02d0def-b561-41e5-b43f-4bbceb8d3368%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)
#### Post date: [April 13, 2015, 11:52pm UTC](https://discuss.elastic.co/t/changing-the-published-port/23203/3 "2015-04-13T23:52:11Z")

</div>

Have you tried transport.publish\_port [1]?

[1][http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-transport.html#\_tcp\_transport](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-transport.html#_tcp_transport)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5ef32ec0-2943-4bc8-8635-1b4945a04f84%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5ef32ec0-2943-4bc8-8635-1b4945a04f84%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Vinicius\_Carvalho](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinicius_carvalho/32/770_2.png) [@Vinicius\_Carvalho](https://discuss.elastic.co/u/Vinicius_Carvalho)
#### Post date: [April 16, 2015, 1:53pm UTC](https://discuss.elastic.co/t/changing-the-published-port/23203/4 "2015-04-16T13:53:08Z")

</div>

Doh! Thanks a lot for this 🙂

On Monday, April 13, 2015 at 7:52:11 PM UTC-4, Jay Modi wrote:

> Have you tried transport.publish\_port [1]?
> 
> [1]  
> [Transport | Elasticsearch Guide [1.5] | Elastic](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-transport.html#_tcp_transport)

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7888d149-d53a-48b7-8fff-9bcb25603f5d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7888d149-d53a-48b7-8fff-9bcb25603f5d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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: [July 6, 2017, 12:19am UTC](https://discuss.elastic.co/t/changing-the-published-port/23203/5 "2017-07-06T00:19:19Z")

</div>


