[GH-ISSUE #4720] Add start and end ports for streams #2998

Open
opened 2026-02-26 07:37:32 +03:00 by kerem · 1 comment
Owner

Originally created by @aanglere on GitHub (Aug 20, 2025).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4720

Is your feature request related to a problem? Please describe.

As of NGINX version 1.15.10, the listen directive accepts port ranges, but NPM only allow adding a stream host listening on a single port.

I wanted to setup a stream for FTP server with passive mode. In order to support passive mode, many ports are needed and it's PITA to add all of them one by one.

Ultimately, I created a custom config under data/nginx/custom/stream.conf to workaround NPM's limitation.

Describe the solution you'd like

Add start and end listening ports when creating stream host
Add start and end forwarding ports
Validate input (same port, same number of ports as forwarding ports)

Describe alternatives you've considered

Currently working using custom config

data/nginx/custom/stream.conf:
`
server {
listen 20-21;
listen [::]:20-21;
listen 32500-32599;
listen [::]:32500-32599;

proxy_pass <INTERNAL_SERVER_IP>:$server_port;
}
`

Additional context

Obviously, I could continue to use custom configs, but this feature will make lives easier. Additionally, servers added through custom configs do not show up in the dashboard.

Originally created by @aanglere on GitHub (Aug 20, 2025). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4720 <!-- Are you in the right place? - If you are looking for support on how to get your upstream server forwarding, please consider asking the community on Reddit. - If you are writing code changes to contribute and need to ask about the internals of the software, Gitter is the best place to ask. - If you think you found a bug with NPM (not Nginx, or your upstream server or MySql) then you are in the *right place.* --> **Is your feature request related to a problem? Please describe.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> As of NGINX version 1.15.10, the _listen_ directive accepts port ranges, but NPM only allow adding a stream host listening on a single port. I wanted to setup a stream for FTP server with passive mode. In order to support passive mode, many ports are needed and it's PITA to add all of them one by one. Ultimately, I created a custom config under data/nginx/custom/stream.conf to workaround NPM's limitation. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> Add start and end listening ports when creating stream host Add start and end forwarding ports Validate input (same port, same number of ports as forwarding ports) **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> Currently working using custom config data/nginx/custom/stream.conf: ` server { listen 20-21; listen [::]:20-21; listen 32500-32599; listen [::]:32500-32599; proxy_pass <INTERNAL_SERVER_IP>:$server_port; } ` **Additional context** <!-- Add any other context or screenshots about the feature request here. --> Obviously, I could continue to use custom configs, but this feature will make lives easier. Additionally, servers added through custom configs do not show up in the dashboard.
Author
Owner

@Keugon commented on GitHub (Dec 5, 2025):

i would greatly appreciate a extension of the configuration possibilities or at least a customs field like in the proxy page

<!-- gh-comment-id:3617794094 --> @Keugon commented on GitHub (Dec 5, 2025): i would greatly appreciate a extension of the configuration possibilities or at least a customs field like in the proxy page
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2998
No description provided.