[GH-ISSUE #5322] Upstream iphash #3168

Open
opened 2026-02-26 07:38:01 +03:00 by kerem · 0 comments
Owner

Originally created by @CyborgRider on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/5322

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

"Problem" is that when I want to use load balancing, I'm expected to edit the nginx.conf file, and save it outside of the docker container to make sure the changes aren't overwritten after each upgrade. This then breaks other things.

Describe the solution you'd like

If possible, it would be amazing to have the option to add an upstream ip hash within the NPM web interface that saves to a separate location than the nginx.conf file but can still be referenced in said conf file. This would hopefully allow creating load balancing in a more permanent way without causing future breaks.

Describe alternatives you've considered

I have for essentially my entire time using NPM, used the custom nginx.conf file, though this recently broke due to an upgrade attempted that changed a log file name. I think maybe having a file referenced in nginx.conf under the http {} that allows us to add an upstream ip hash later, have it stored outside the container like most of the custom proxy hosts and ssl certs, then create an interface for load balancing to simplify the creation of these load balances in a tab under the admin web portal inside of settings or somewhere like this, and even adding easy access to select the load balance IP hash in question as a destination for proxy hosts.

Additional context

for reference, this is the only change made to my nginx.conf file:

http { # All of the rest of this section is untouched, so I will only provide the line before and after my change:
proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
upstream HighAvailabilityFailover {
ip_hash;
server localIP1:port;
server localIP2:port;
server localIP3:port;
}

include /etc/nginx/conf.d/include/log-proxy.conf;
}

I then call proxy_pass https://HighAvailabilityFailover from my Custom Nginx Configuration to ensure access to whichever server is currently up and running with the least local traffic.

I am not familiar enough to code this myself, but the hope would be, a file could be referenced here that the upstream hash could be added to via settings, to bypass the need for keeping a static nginx.conf. This would help for people who have several servers in a cluster to ensure up-time and high availability fail-over is accessible.

Originally created by @CyborgRider on GitHub (Feb 17, 2026). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/5322 <!-- 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 [...] --> "Problem" is that when I want to use load balancing, I'm expected to edit the nginx.conf file, and save it outside of the docker container to make sure the changes aren't overwritten after each upgrade. This then breaks other things. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> If possible, it would be amazing to have the option to add an upstream ip hash within the NPM web interface that saves to a separate location than the nginx.conf file but can still be referenced in said conf file. This would hopefully allow creating load balancing in a more permanent way without causing future breaks. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> I have for essentially my entire time using NPM, used the custom nginx.conf file, though this recently broke due to an upgrade attempted that changed a log file name. I think maybe having a file referenced in nginx.conf under the http {} that allows us to add an upstream ip hash later, have it stored outside the container like most of the custom proxy hosts and ssl certs, then create an interface for load balancing to simplify the creation of these load balances in a tab under the admin web portal inside of settings or somewhere like this, and even adding easy access to select the load balance IP hash in question as a destination for proxy hosts. **Additional context** <!-- Add any other context or screenshots about the feature request here. --> for reference, this is the only change made to my nginx.conf file: http { # All of the rest of this section is untouched, so I will only provide the line before and after my change: proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m; **_upstream HighAvailabilityFailover { ip_hash; server localIP1:port; server localIP2:port; server localIP3:port; }_** include /etc/nginx/conf.d/include/log-proxy.conf; } I then call proxy_pass https://HighAvailabilityFailover from my Custom Nginx Configuration to ensure access to whichever server is currently up and running with the least local traffic. I am not familiar enough to code this myself, but the hope would be, a file could be referenced here that the upstream hash could be added to via settings, to bypass the need for keeping a static nginx.conf. This would help for people who have several servers in a cluster to ensure up-time and high availability fail-over is accessible.
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#3168
No description provided.