# Change Client / Server Port from 9000 to Port 80

**URL:** <https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457>\
**Category:** General Discussions\
**Created:** [January 21, 2020, 11:53pm UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457 "2020-01-21T23:53:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ikkysleepy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ikkysleepy/32/156_2.png) [@ikkysleepy](https://hub.mender.io/u/ikkysleepy)\
**Post date:** [January 21, 2020, 11:53pm UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/1 "2020-01-21T23:53:25Z")

</div>

Can you change the mender client and server port from 9000 to port 80 or 443? Also, do you know if the port 9000 is both outbound and inbound TCP traffic?

Thanks,  
– Jorge

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [January 23, 2020, 8:07am UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/2 "2020-01-23T08:07:28Z")

</div>

I believe that port 9000 is only used for outbound traffic.

I will leave it to someone else to comment of feasibility to change port.

@merlin @0lmi ?

---

<div class="post-metadata">

**Author:** ![0lmi](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/0lmi/32/133_2.png) [@0lmi](https://hub.mender.io/u/0lmi)\
**Post date:** [January 23, 2020, 8:45am UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/3 "2020-01-23T08:45:14Z")

</div>

Depending from the setup `mender-api-gateway` listens on 80 and 443 (in some setup listens only 443), traffic from 80 is redirected to 443. Port 9000 is used by Minio (through `storage-proxy`) which is S3 compatible storage (where artifacts are stored).

`deployments` service uploads artifacts to port 9000 and clients download artifacts from port 9000, so, it’s used for both inbound and outbound TCP traffic. The traffic is ssl encrypted.

If needed port 9000 can be changed to any other.

---

<div class="post-metadata">

**Author:** ![shainert.israel](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/shainert.israel/32/438_2.png) [@shainert.israel](https://hub.mender.io/u/shainert.israel)\
**Post date:** [January 26, 2020, 8:06am UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/4 "2020-01-26T08:06:45Z")

</div>

Can you please clarify for what purpose port 9000 is used?  
I was expecting that only port 443 will be used between the Mender client (part of the IoT device) and the Internet.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [January 28, 2020, 8:02pm UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/5 "2020-01-28T20:02:03Z")

</div>

Hi @shainert.israel that is the port used for actual file downloads. If you use the Mender docker-compose setup with integrated Minio storage proxy, then a separate port is used to avoid clashing with the API gateway. If you modify it to use S3 directly, then your Mender clients will communicate with the API gateway on your server IP but then for actual artifact downloads, they will use an aws.amazon.blah URL which may or may not be port 9000.

---

<div class="post-metadata">

**Author:** ![ikkysleepy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ikkysleepy/32/156_2.png) [@ikkysleepy](https://hub.mender.io/u/ikkysleepy)\
**Post date:** [January 28, 2020, 11:06pm UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/6 "2020-01-28T23:06:29Z")

</div>

Sounds like you can change the port, but not sure how you would on the client side. Does anyone have any link to documentation to change the client default port? Or will the client talk to the server and it get’s re-routed the correct server and port? So, if you change it to aws server on port 443, then the server will tell the client to go to aws on port 443 vs going to local server on port 900? Anyways, thanks for the info.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [January 29, 2020, 7:30am UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/7 "2020-01-29T07:30:43Z")

</div>

If i recall, the gateway api hands back to the client a URI to the file to be downloaded. You could test it via the rest api before and after port change to make sure the port is included in the URI. if the port is missing then its probably a bug that needs to be reported. I believe there is example usage with curl/wget in the mender docs.

[https://docs.mender.io/2.2/apis/open-source/device-apis/deployments#device-deployments-next-get](https://docs.mender.io/2.2/apis/open-source/device-apis/deployments#device-deployments-next-get)  
[https://docs.mender.io/2.2/server-integration/using-the-apis](https://docs.mender.io/2.2/server-integration/using-the-apis)

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [January 29, 2020, 8:26am UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/8 "2020-01-29T08:26:15Z")

</div>

As @dellgreen mentioned, the server will provide an URL to the client which includes the port so there should not be any changes needed on the client.

---

<div class="post-metadata">

**Author:** ![genedupre](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/genedupre/32/289_2.png) [@genedupre](https://hub.mender.io/u/genedupre)\
**Post date:** [February 3, 2020, 12:43pm UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/9 "2020-02-03T12:43:19Z")

</div>

hello @ikkysleepy,  
can you report if this succeeded on port 80 or not? i tried this and the mender deployments container broke  
Greets Gene

---

<div class="post-metadata">

**Author:** ![jmeirow](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@jmeirow](https://hub.mender.io/u/jmeirow)\
**Post date:** [February 17, 2021, 6:24pm UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/10 "2021-02-17T18:24:53Z")

</div>

Looks like there was never a final response as to how this worked, but I have to do the exact same thing as we do not allow port 9000 on our reverse proxy. I’ll let you know.

---

<div class="post-metadata">

**Author:** ![ikkysleepy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ikkysleepy/32/156_2.png) [@ikkysleepy](https://hub.mender.io/u/ikkysleepy)\
**Post date:** [May 2, 2021, 8:34am UTC](https://hub.mender.io/t/change-client-server-port-from-9000-to-port-80/1457/11 "2021-05-02T08:34:58Z")

</div>

We never switched the port. Not sure if you guys got it to work.
