<p>This should be fine.  It's something you may even have to do if ports are already in use on localhost.  Even development languages like <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-2.2" rel="nofollow noreferrer">.net core</a> are now supporting different environments that can be used to configure the different ports.</p>

<p>Example: 1433 is the standard sql server port.  If I wanted to test a local sql server container, but did not want to stop my locally installed sql server, I could run it on another port (e.g. 1431).</p>

CC BY-SA 4.0
2019-07-22T17:57:54.700Z
2019-07-22T17:57:54.700Z
Wesley Rolnick
<p>A bit of an odd question I think but here goes: I have a couple of services running in an application that I'm building. In production each service is containerised and lives on its own server. But on my development computer I like to keep local versions all running. Of course, if I have multiple services running on localhost, the only way to do this is to have them each on their own port. Now, to maintain parity between development and production, I figure that I must now also get them all running on those different ports in production.</p>

<p>So I guess my question is is it okay to have all these services running on "non-standard" ports (eg, a webserver that isn't on 80 or 443) in production. My understanding of ports is that:
1) There are some ports usually used for specific services.
2) This isn't mandatory.
3) Some people deliberately change them for security through obscification, but this doesn't achieve much.</p>

<p>So it should be fine? Or is there a better practice for this problem?</p>

<microservices><ports>
Running services on different ports in development environment and production environment
Neil
# Running services on different ports in development environment and production environment

(Asked by: username_0 on 2019-07-22)

A bit of an odd question I think but here goes: I have a couple of services running in an application that I'm building. In production each service is containerised and lives on its own server. But on my development computer I like to keep local versions all running. Of course, if I have multiple services running on localhost, the only way to do this is to have them each on their own port. Now, to maintain parity between development and production, I figure that I must now also get them all running on those different ports in production.

So I guess my question is is it okay to have all these services running on "non-standard" ports (eg, a webserver that isn't on 80 or 443) in production. My understanding of ports is that:
1) There are some ports usually used for specific services.
2) This isn't mandatory.
3) Some people deliberately change them for security through obscification, but this doesn't achieve much.

So it should be fine? Or is there a better practice for this problem?

**Tags:** microservices, ports


---

## 1 answers

### Answer by username_1 on 2019-07-22. Score: 1 | Accepted answer

This should be fine. It's something you may even have to do if ports are already in use on localhost. Even development languages like [.net core](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-2.2) are now supporting different environments that can be used to configure the different ports.

Example: 1433 is the standard sql server port. If I wanted to test a local sql server container, but did not want to stop my locally installed sql server, I could run it on another port (e.g. 1431).


---

