NginxProxyManager / NginxProxyManager/nginx-proxy-manager

Allow Changing the Default Ports; Currently Blocks Host Networking

Open
#4,122 4 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
34.2k
Forks
3.9k
Avg merge
21h 12m
Merged PRs (30d)
20

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the container configures Nginx's HTTP and HTTPS listen ports and how the web UI port is exposed. Check the existing environment-variable and Docker configuration paths, then verify that configurable ports work with host networking while preserving the default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, nginx
Domain
infrastructure, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.