AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Auto Reload SSL Certificate from file

Open ssrahul96 opened this issue 3 years ago • 4 comments

Prerequisites

  • [X] I have checked the Wiki and Discussions and found no answer

  • [X] I have searched other issues and found no duplicates

  • [X] I want to request a feature or enhancement and not ask a question

Description

What problem are you trying to solve?

When the reffered SSL Certificate gets updated (typically certbot), we need to go to Encryption Settings and Click on Save for the new certificate to get updated.

Proposed solution

Most of the cases, we would ve automated certbot renewal in cron. So is it possible to check for the updated certificate and reload automatically? like the way the filters are updated??

Alternatives considered

Additional information

ssrahul96 avatar Nov 15 '22 14:11 ssrahul96

Let the certbot post-hook restart AdGuardHome. You have to restart the webserver anyways after the certificate has been renewed, so just add the restart command for AdGuardHome there as well.

ppfeufer avatar Nov 15 '22 15:11 ppfeufer

i am okay with your workaround if we dont ve option to reload the certificate without server reboot,

the save is a POST call, we could just call the respective function internally and achieve it easily,

probally i could take a look at that and submit a PR.

ssrahul96 avatar Nov 15 '22 17:11 ssrahul96

That is not a workaround at all. That is what you do when SSL certificates are renewed, you restart all services using the renewed certificate.

Sending a POST request also needs to be triggered when the certificate is renewed, or in other words by certbot's post-hook. So it makes no difference here if you send the POST request or simply restart the service.

ppfeufer avatar Nov 15 '22 18:11 ppfeufer

I would opt for 'reload' rather than 'restart'

ssrahul96 avatar Nov 16 '22 02:11 ssrahul96

ack.

Gatsby-Lee avatar Oct 24 '23 20:10 Gatsby-Lee