mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-28 10:55:54 +03:00
[GH-ISSUE #1775] How to listen to other port than 80/443 #1316
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#1316
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @eranwo on GitHub (Jan 19, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1775
Hi,
First I want to thank the developers for this wonderful project.
Is it possible to make a redirect of domain listen in other port then 80/443?
I mean in case that we need to redirect
domain.com:7007todomain2.com(and secure the port 7007)This is useful for example for Internet radio stations that used to broadcast on port other than port 80 and want to maintain the structure of their stream URL.
@lieven121 commented on GitHub (Feb 20, 2022):
Hi if you want to receive traffic on another port e.g. 7007 you can portforward that port (either in docker or in your firewall)
for in docker

here you would need the first 80 or the first 443 to 7007 depending if the connection is https
e.g
7007:80
then in NPM

place here domain2.com and use port 443
Also please change the tag to Question, this is not a bug
Kind regards
@eranwo commented on GitHub (Feb 28, 2022):
Thanks @lieven121
BTW, I'm not sure that I can change the label from bug to question.
Could you explain how?
@cn-ml commented on GitHub (Jun 9, 2022):
I think I'm facing a similar problem as @eranwo
I want to reverse proxy multiple services on default port 443, but i additionally want to host a matrix federation server that requires me to listen to external port 8448. So for some proxy hosts, i.e. portainer.mydomain.tld i need to listen to 80 and 443, but for matrix.mydomain.tld:8448 i want to listen to 8448 as an ssl port. I am not sure how to achieve this. Is it possible to use the existing proxy host configuration but adding a listen directive in the custom configuration field?
@0chroma commented on GitHub (Sep 17, 2022):
you can create a forward host with the port included in the domain name (matrix.mydomain.tld:8448) in your case and add this to the custom nginx config tab:
listen 8448 ssl default_server;I'm surprised this isn't done automatically
@gunsar commented on GitHub (May 8, 2023):
I tried using the stream menu in the proxy manager adding listen port 8400 tcp udp, the result is:
http://domain.tld:8400 (non ssl, running normally)
https://domain.tld:8400 (ssl, not running)
how to make ssl url work well?
@zer0brain commented on GitHub (Aug 29, 2023):
you can try using my workaround to use custom ports for host without default:
https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2969
@Technerd-SG commented on GitHub (Feb 23, 2024):
Is this something that is been worked on?

DSM (Synology Nas) does it like this:
Could something like this be implemented?
Thanks for the awsome work done here!
@github-actions[bot] commented on GitHub (Oct 5, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@RuStyC0der commented on GitHub (Oct 21, 2024):
I want to keep it open) It would be great to be able to set custom external ports for proxy manager
@rescenic commented on GitHub (Jan 6, 2025):
So sad, it doesn't support custom port for virtualhost.
@Surrogard commented on GitHub (Apr 10, 2025):
Is it generally possible to change the external ports of npm? I know I can change the ports in the docker compose and that is working fine so far but if I want to enable ssl certbot is failing with the challenge because it tells letsencrypt to download the challenge files from port 80.
@Technerd-SG commented on GitHub (Jun 12, 2025):
Yea it shouldn't be so hard to implement
@dustojnikhummer commented on GitHub (Jul 16, 2025):
I still think this is relevant. I would like to run it in Podman in Host mode, but i had to lower privileged ports down to 80, since NPM has no way to run (internally, not via external Docker/Podman port mapping) on higher ports.
Hell, I think it should be higher by default, internally.
@RuStyC0der commented on GitHub (Jul 17, 2025):
Guys, I think I found a solution, well, for some of us at least. Solution is to create streams:
I have one host for my smarthome server which is accessible at port 80/443 added as regular proxy host
and I just added stream for port I need, for destination I set NPM host address itself and for incoming port I set port I need NPM to listen to
it works like this:
As a bonus you still be able to issue/renew Let's encrypt certs
There may be issue with ssl redirects, since it will try to redirect you to port 443 anyway
@github-actions[bot] commented on GitHub (Jan 28, 2026):
Issue is now considered stale. If you want to keep it open, please comment 👍