High Availability solution with Nginx Proxy Manager
I tried to do a High Availability solution with Nginx Proxy Manager + Keepalived + inotify-tools but there is a problem with auto-reading configuration on the second NPM. NPM configuration is synchronized between hosts using inotify but to read it you need to restart NPM on the other host. Has anyone done HA for NPM? Maybe the solution would be to keep the configuration in the database.
@kamilkobak do you want 2 NPM or one NPM and a second failover nginx, if so I guess that would be easier. Only requiring inotify to check on changes to parts of the data docker volume. Either way the second nginx will have to be reloaded and sometimes restarted depending on what was changed.
HA is 2 NPM running at the same time and connections from outside are routed by 1 or 2 NPM depending on where the external IP will be assigned using Keepalived
I don't think that can be done with simply sharing the data and database, how will each NPM know if the other has already done a piece of work? unless NPM is built to have this understanding from day one. Given its mission statement of being to "provide users with a easy way to accomplish reverse proxying hosts with SSL termination and it had to be so easy that a monkey could do it" I would think that NPM was not built with HA in mind. Also given how often letsencrypt has to be run, once successfully in a month period (NPM tries a renew from month 2 of the 3 month cert), my first point stands isn't nginx without NPM able to be HA in a much easier fashion now.
I think just basic failover as an option would be great...inotify and keepalived. Alternatively, having this available as a non-docker install and letting people install inotify/keepalived themselves if they want to go that route would be a good option. It's reasonably well documented elsewhere and can keep the core of this project focussed on the NPM UI and experience while allowing people to simply mirror the configs.
Issue is now considered stale. If you want to keep it open, please comment :+1:
I would 100% be in need of this. So far, NPM is running on my main Docker instance. I try to keep reboots and downtime to a minimum, but because it is also a testing environment for new containers, issues do happen, HA NPM would help a lot as I am transitioning everything from IP addresses to HTTPS URLs.