Managing ports within Docker reddit / selfhosted ---------------------------------------------------------------------- Tr4shM0nk3y · 2023-12-19 13:51 You'd use a reverse proxy to route traffic depending on incoming request to containername:port, that way you can have infinite web- based things running without problems. ---------------------------------------------------------------------- YYCwhatyoudidthere · 2023-12-19 15:47 I probably have one of everything based on peculiarities of the app, but in general I 81:80, 82:80, 83:80. TLS is similarly aligned 81:80/8441:443, 82:80/8442:443. I user docker-compose so it is easy to look up what it was set at, but with a reverse proxy in place I rarely need to remember the specific docker exposed ports. ---------------------------------------------------------------------- KALELSUPRMN · 2023-12-20 03:45 I just keep an excel spreadsheet of how I have everything mapped and make sure to keep up with it. * Containers on my gluetun-vpn network get assigned ports starting in the 7000 range for the host port and then whatever it needs to be mapped to on the container side * Containers on a bridge network get assigned ports starting in the 9000 range * for example, dozzle gets 9000 on the host side and mapped to 8080 in the container * homer gets 9001 mapped to 8080 * so on and so forth * I also have 4 vlans with dedicated NICs and for any container that's on a macvlan network assigned to one of those NICs, they just get a static IP and use their default ports since there's no need to really remap those. ---------------------------------------------------------------------- unixuser011 · 2023-12-20 08:22 >I also have 4 vlans with dedicated NICs and for any container that's on a macvlan network assigned to one of those NICs, they just get a static IP and use their default ports since there's no need to really remap those. That's kinda what I'm aiming for. I'm doing a complete rebuild in summer 2024 and I'm going to create a dedicated MACVLAN docker subnet and assign an IP to each separate container - but for now, I'll keep everything in a spreadsheet and assign unused ports over 65535