# Possibility of mender server port change

**URL:** <https://hub.mender.io/t/possibility-of-mender-server-port-change/6019>\
**Category:** General Discussions\
**Created:** [July 20, 2023, 8:40am UTC](https://hub.mender.io/t/possibility-of-mender-server-port-change/6019 "2023-07-20T08:40:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dekan](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@dekan](https://hub.mender.io/u/dekan)\
**Post date:** [July 20, 2023, 8:40am UTC](https://hub.mender.io/t/possibility-of-mender-server-port-change/6019/1 "2023-07-20T08:40:59Z")

</div>

Hello everybody,  
I am currently trying to do installation mender server with docker compose. The server that I am currently using has already been using the port 443.There is a running traefik on the port 443 for my other services.Thus, I wonder whether or not I can change the mender’s traefik to a different port, and then configure my clients such that they are now compatible with the new port ? If so, how can I do that.What are the necessary steps that I need to follow ? If this is not possible, should I consider a different approach such as traefik behind traefik ?

---

<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:** [July 20, 2023, 9:03am UTC](https://hub.mender.io/t/possibility-of-mender-server-port-change/6019/2 "2023-07-20T09:03:53Z")

</div>

Yes, i have the same setup and run on port 9443 for simiar reasons:

In the mender server production config, I have

On and older mender server install, I have:

```auto

 mender-api-gateway:
        ports:
            # list of ports API gateway is made available on
            - "9443:443"
        environment:
            ALLOWED_HOSTS: mydomain.com:9443 mydomain.co.uk:9443

```

Client-side i guess you would add the port to the server URL part, however I haven’t tested that as I only use the client in standalone mode, but i have no reason to think that wouldnt work fine.

---

<div class="post-metadata">

**Author:** ![dekan](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@dekan](https://hub.mender.io/u/dekan)\
**Post date:** [July 20, 2023, 10:23am UTC](https://hub.mender.io/t/possibility-of-mender-server-port-change/6019/3 "2023-07-20T10:23:01Z")

</div>

Thanks a lot sir, but I thought that I don’t need to another port because I have already traefik on the port 443 for my current services. Instead, I can configure my existing traefik that is running on port 443 such that it can serve both my current services and mender services.I’m going to achieve this right now.

---

<div class="post-metadata">

**Author:** ![robgio](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/robgio/32/1760_2.png) [@robgio](https://hub.mender.io/u/robgio)\
**Post date:** [July 20, 2023, 5:20pm UTC](https://hub.mender.io/t/possibility-of-mender-server-port-change/6019/4 "2023-07-20T17:20:00Z")

</div>

Hello @dekan ,  
I would discourage using a Traefik instance to both Mender and another not related service; this could lead to collisions.  
I think @dellgreen 's approach is the most suitable for your environment.
