NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
21.9k stars 2.53k forks source link

Custom certificate by path, including autoreload on change #3186

Open McBane87 opened 12 months ago

McBane87 commented 12 months ago

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

I wanted to use dns challenge for my domains (multiple), because this ways, the certs are created as wildcard and all possible subdomains would be already included. As NPM isn't offering an option to create a multidomain certifiacte, using dns challange, I decided to use acme.sh for this. The (acme.sh) certificate is stored on the same host, where NPM is running. Now, I wanted to add this certificate, using the "SSL Certificates" menu. But then I realized, that custom certs can only be upload and not given by path. And even if I could, there would still be the question, how to reload NPM's nginx, when certificate gets renewed by acme.sh?

Describe the solution you'd like

It would be nice to have the possibilty to add a certificate/key by path and then let NPM, periodically check if the files were changed. If they have changed, NPM would trigger a reload of these certs, in order to make the configured hosts to use the renewd certificate.

Describe alternatives you've considered

I thought about adding the cert/key path, using the advanced host config, if this is even possible. But what would I do, when cert got renewed, by acme.sh? How could I make NPM to reload the host, in order to read in the new certificate?

EDIT: Found soltion for nginx reload: docker exec npmanager /package/admin/s6/command/s6-svc -h /run/service/nginx. Still would be nice to have an automatic builtin functionality for this.

Additional context

No.

agent-ck commented 8 months ago

Also affects #2954

wakawakaaa commented 3 months ago

Yes, please support custom certificate files update externally (copy paste) and NPM can still should work without doing docker compose down && docker compose up