nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

NPM & Certbot Renewal Hooks

Open jtrosper opened this issue 2 years ago • 4 comments

Certbot renewal hooks not firing. See discussion.

Discussed in https://github.com/NginxProxyManager/nginx-proxy-manager/discussions/2023

Originally posted by jtrosper April 22, 2022 Hello,

I have a use case where my goal is the following:

Have NPM running via docker Have a proxy host configured with NPM's letsencrypt support generating the SSL cert. Have a script on the local host's file system in /npm-dir/letsencrypt/renewal-hooks/post/ which uses the cert generated via npm/certbot.

My understanding is that a standard install of certbot will automatically execute anything contained in /renewal-hooks/post/ without having to specify any extra config.

Does a dockerized NPM installation also do this, if a post-renewal script is placed into this folder? Or does it need to live inside of the container somehow?

jtrosper avatar Sep 07 '23 13:09 jtrosper

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Apr 06 '24 01:04 github-actions[bot]

Keeping open.

Thanks, Jimmy Trosper


From: github-actions[bot] @.> Sent: Friday, April 5, 2024 9:48:11 PM To: NginxProxyManager/nginx-proxy-manager @.> Cc: Jimmy Trosper @.>; Author @.> Subject: Re: [NginxProxyManager/nginx-proxy-manager] NPM & Certbot Renewal Hooks (Issue #3185)

Issue is now considered stale. If you want to keep it open, please comment 👍

— Reply to this email directly, view it on GitHubhttps://github.com/NginxProxyManager/nginx-proxy-manager/issues/3185#issuecomment-2040852049, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADSCXG6K4L62FPE3GXKUORDY35H5XAVCNFSM6AAAAAA4O4LEQCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBQHA2TEMBUHE. You are receiving this because you authored the thread.Message ID: @.***>

jtrosper avatar Apr 06 '24 08:04 jtrosper

Hello jtrosper, did you find a solution to this?

I'm doing exactly the same thing, and similarly, the bash script I've put in renewal-hooks/post does not seem to get executed.

** UPDATE ** I thought about this for about 10 seconds longer and realised that the problem is this is all happening inside the NPM docker container, so obviously can modify files on the host. I ended up creating a bash script that compares the timestamp of the exposed NPM certs against the host certs, and the copies them across if newer and then updates the permissions etc. This script is then run every 5min via cron job.

alphalove avatar Nov 30 '24 02:11 alphalove

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Jun 04 '25 02:06 github-actions[bot]