question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Customize SSL cert renewing interval to avoid reloading nginx every hour

See original GitHub issue

Is your feature request related to a problem? Please describe. First of all: great tool! Setting up reverse poxies is really fun with this one 😃

According to the docker logs, npm is checking for expired certificates every hour:

[10/26/2020] [1:26:22 AM] [SSL      ] › ℹ  info      Renewing SSL certs close to expiry...
[10/26/2020] [1:26:24 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[10/26/2020] [1:26:24 AM] [SSL      ] › ℹ  info      Renew Complete
[10/26/2020] [2:26:22 AM] [SSL      ] › ℹ  info      Renewing SSL certs close to expiry...
[10/26/2020] [2:26:24 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[10/26/2020] [2:26:24 AM] [SSL      ] › ℹ  info      Renew Complete
[10/26/2020] [3:26:22 AM] [SSL      ] › ℹ  info      Renewing SSL certs close to expiry...
[10/26/2020] [3:26:23 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[10/26/2020] [3:26:23 AM] [SSL      ] › ℹ  info      Renew Complete
[...]

I think reloading nginx every hour could lead to problems in the business times of our web services (e.g. downloads buffered by nginx …)

Is there a way to customize the cron job which triggers the cert renewing every hour to start the renewing only once a day or so?

Describe the solution you’d like some way (UI or production.config) to customize the renewal interval

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:8
  • Comments:16

github_iconTop GitHub Comments

1reaction
pShotacommented, Nov 16, 2022

(bump) may I ask any update on this?

1reaction
niklasdahlheimercommented, Aug 19, 2021

probably it’s just changing https://github.com/jc21/nginx-proxy-manager/blob/4f10d129c20cc82494b95cc94b97f859dbd4b54d/backend/internal/certificate.js#L24 to intervalTimeout: (process.env.CERTIFICATE_RENEWAL_INTERVAL_IN_SECONDS * 1000) || (1000 * 60 * 60), // 1 hour

Than the environment variable CERTIFICATE_RENEWAL_INTERVAL_IN_SECONDS could be used to set the preferred interval.

Sadly I’m not able to setup a working build environment to test it to create a pull request 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize SSL cert renewing interval to avoid reloading nginx ...
certbot renew This command attempts to renew any previously-obtained certificates that expire in less than 30 days. The same plugin and options ...
Read more >
Do I Need to Restart Nginx if I Renew My Security Certificate(s)?
If for some reason, Nginx does not reload your certificate, you can restart it, but note that it will have much more of...
Read more >
Configuring auto renewing LetsEncrypt SSL certs with Nginx ...
This will run the renew process twice daily, exactly as above when you ran it manually. The -q flag is provided to prevent...
Read more >
NGINX SSL Termination
Terminate HTTPS traffic from clients, relieving your upstream web and application servers of the computational load of SSL/TLS encryption.
Read more >
How to configure HTTPS for an Nginx Docker Container
At 12 hour intervals, this will detect whether your certificate needs to be renewed or not. Then using the following, this time added...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found