mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 01:15:51 +03:00
[PR #5212] Feat: allow user set custom ports for Nginx and Web UI #4092
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#4092
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?
📋 Pull Request Information
Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/5212
Author: @beniamin
Created: 1/23/2026
Status: 🔄 Open
Base:
develop← Head:custom-ports📝 Commits (1)
d95863dset custom port trough env variables. sometimes user may need to use host network where some other services may already use 80,443,81 ports📊 Changes
8 files changed (+94 additions, -12 deletions)
View changed files
📝
backend/internal/nginx.js(+24 -0)📝
backend/templates/_listen.conf(+6 -6)📝
backend/templates/default.conf(+3 -3)📝
backend/templates/letsencrypt-request.conf(+2 -2)📝
docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/00-all.sh(+2 -1)➕
docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/60-ports.sh(+40 -0)📝
docker/rootfs/etc/s6-overlay/s6-rc.d/prepare/70-secrets.sh(+0 -0)📝
docs/src/advanced-config/index.md(+17 -0)📄 Description
Latest versions of TrueNAS have been migrated the Apps from k8s to docker and nginx-proxy-manager is the recommended way(in multiple discussion) to be used as a proxy for internal applications. For the setup to be secure and Nginx-proxy-manager to properly forward the traffic to the internal apps, it must be deployed using host_network options.
There are several issues on TrueNAS Apps Catalog repo([Enhancement]: Nginx Proxy Manager - host network and Allow Host Networking for Nginx Proxy Manager) asking for possibility to set nginx-proxy-manager with host_network, but since 80,443 and 81 ports may conflict with other running services on the server, TrueNAS admin require that nginx-proxy-manager should have the possibility to to use custom ports instead of default ones.
This PR change current behavior and adds option for default ports to be changed trough HTTP_PORT, HTTPS_PORT and WEB_UI_PORT environment variables.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.