nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Allow Changing the Default Ports; Currently Blocks Host Networking

Open mtwo opened this issue 1 year ago • 2 comments

I've seen several issues in this repository that request the ability to change the default listen ports for HTTP and HTTPS traffic, however most of these are solvable by configuring the correct bridge ports in Docker or Kubernetes.

However, there is a use case for NPM that requires changing the ports within the container: host networking. Host networking offers significant performance improvements over bridge networking, as the Docker runtime doesn't have to handle any of the incoming or outgoing network traffic from the application. It is often recommended for network proxies like Nginx for this reason, and there are some compelling benchmarks of the performance differences.

Unfortunately, Docker host networking removes the ability for Docker to remap ports, meaning that the default ports of the application inside of the container are used instead. This causes issues in Docker environments were ports 80 and 443 are already used by the host operating system or other applications, which is the case for TrueNAS and several others: https://github.com/truenas/apps/issues/734

Being able to set the Nginx listen and web UI ports via an environment variable or some other mechanism would allow users in any Docker environment to gain the performance benefits of using the host network driver.

mtwo avatar Oct 30 '24 16:10 mtwo

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar May 14 '25 02:05 github-actions[bot]

👍

HafizAhmedMoon avatar Jun 15 '25 15:06 HafizAhmedMoon