[GH-ISSUE #4748] Custom listening port 80 443 81 #2999

Closed
opened 2026-02-26 07:37:32 +03:00 by kerem · 4 comments
Owner

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

使用host网络模式安装npm,自定义80 81 443监听端口,目前我是挂载./templates:/app/templates和./default.conf:/etc/nginx/conf.d/default.conf,手动修改文件里面的端口。存量数据是修改了/data/nginx/proxy_host/*.conf文件里面的端口。能不能增加环境变量调整监听端口?

Install npm using host network mode, customize the 80 81 443 listening port, currently I am mounting ./templates:/app/templates and ./default.conf:/etc/nginx/conf.d/default.conf, and manually modify the port in the file. The stock data is the port in the /data/nginx/proxy_host/*.conf file that has been modified. Can you add environment variables to adjust the listening port?

Originally created by @907739769 on GitHub (Aug 31, 2025). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/4748 使用host网络模式安装npm,自定义80 81 443监听端口,目前我是挂载./templates:/app/templates和./default.conf:/etc/nginx/conf.d/default.conf,手动修改文件里面的端口。存量数据是修改了/data/nginx/proxy_host/*.conf文件里面的端口。能不能增加环境变量调整监听端口? Install npm using host network mode, customize the 80 81 443 listening port, currently I am mounting ./templates:/app/templates and ./default.conf:/etc/nginx/conf.d/default.conf, and manually modify the port in the file. The stock data is the port in the /data/nginx/proxy_host/*.conf file that has been modified. Can you add environment variables to adjust the listening port?
kerem 2026-02-26 07:37:32 +03:00
Author
Owner

@BlueDementedTomCat commented on GitHub (Sep 3, 2025):

哦兄弟,你简直是英雄.我在尝试NPM + fail2ban.容器必须开启host模式才能返回真实访问者的IP.国内国情又特殊,443和80端口全被锁了.我配合AI摸索了一下午,最后也只摸索出来修改/data/nginx/proxy_host/*.conf. 实在没办法了,准备来issue看看.没想到竟然有答案.

Oh brother, you’re truly a hero. I’ve been trying to configure fail2ban, and the container must run in host mode to return the real visitor’s IP. But since in China ports 443 and 80 are all blocked, I’ve been struggling. I spent the whole afternoon experimenting with AI, and in the end I only managed to figure out how to modify /data/nginx/proxy_host/*.conf. I was out of options and was about to open an issue for help, but I didn’t expect to actually find the answer here.

<!-- gh-comment-id:3248672699 --> @BlueDementedTomCat commented on GitHub (Sep 3, 2025): 哦兄弟,你简直是英雄.我在尝试NPM + fail2ban.容器必须开启host模式才能返回真实访问者的IP.国内国情又特殊,443和80端口全被锁了.我配合AI摸索了一下午,最后也只摸索出来修改/data/nginx/proxy_host/*.conf. 实在没办法了,准备来issue看看.没想到竟然有答案. Oh brother, you’re truly a hero. I’ve been trying to configure fail2ban, and the container must run in host mode to return the real visitor’s IP. But since in China ports 443 and 80 are all blocked, I’ve been struggling. I spent the whole afternoon experimenting with AI, and in the end I only managed to figure out how to modify /data/nginx/proxy_host/*.conf. I was out of options and was about to open an issue for help, but I didn’t expect to actually find the answer here.
Author
Owner

@popozhu commented on GitHub (Sep 6, 2025):

the same with you, and you can test and use my build
https://hub.docker.com/r/popozhu/nginx-proxy-manager-with-other-ports

<!-- gh-comment-id:3262649695 --> @popozhu commented on GitHub (Sep 6, 2025): the same with you, and you can test and use my build https://hub.docker.com/r/popozhu/nginx-proxy-manager-with-other-ports
Author
Owner

@snakwu commented on GitHub (Sep 26, 2025):

the same with you, and you can test and use my build https://hub.docker.com/r/popozhu/nginx-proxy-manager-with-other-ports

谢谢,终于解决了非443标准端口问题了,谢谢,在官方没有添加这个功能前,我就一直跟着你的镜像用了,谢谢

<!-- gh-comment-id:3337705383 --> @snakwu commented on GitHub (Sep 26, 2025): > the same with you, and you can test and use my build https://hub.docker.com/r/popozhu/nginx-proxy-manager-with-other-ports 谢谢,终于解决了非443标准端口问题了,谢谢,在官方没有添加这个功能前,我就一直跟着你的镜像用了,谢谢
Author
Owner

@snakwu commented on GitHub (Sep 27, 2025):

@jc21 I hope that custom port function can be supported, thank you.

<!-- gh-comment-id:3341338372 --> @snakwu commented on GitHub (Sep 27, 2025): @jc21 I hope that custom port function can be supported, thank you.
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#2999
No description provided.