@@ -47,6 +47,22 @@ files).
4747 [ Docker] ( https://www.docker.com/ ) to function.
4848
4949
50+ ## Available Environment Variables
51+
52+ ### Reuired
53+ - ` CERTBOT_EMAIL ` : Your e-mail address. Used by Let's Encrypt to contact you in
54+ case of security issues.
55+
56+ ### Optional
57+ - ` STAGING ` : Set to ` 1 ` to use Let's Encrypt's
58+ [ staging servers] ( #initial-testing ) (default: ` 0 ` )
59+ - ` DHPARAM_SIZE ` : The size of the
60+ [ Diffie-Hellman parameters] ( #diffie-hellman-parameters )
61+ (default: ` 2048 ` )
62+ - ` RSA_KEY_SIZE ` : The size of the RSA encryption keys (default: ` 2048 ` )
63+ - ` RENEWAL_INTERVAL ` : Time interval between certbot's
64+ [ renewal checks] ( #renewal-check-interval ) (default: ` 8d ` )
65+
5066## Run with ` docker run `
5167
5268### Build it yourself
@@ -103,6 +119,7 @@ services:
103119 - STAGING=0
104120 - DHPARAM_SIZE=2048
105121 - RSA_KEY_SIZE=2048
122+ - RENEWAL_INTERVAL=8d
106123 ports :
107124 - 80:80
108125 - 443:443
@@ -193,6 +210,36 @@ certificate request from the above file will then become something like this
193210certbot ... -d yourdomain.org -d www.yourdomain.org -d sub.yourdomain.org
194211` ` `
195212
213+ # ## Renewal check interval
214+ This container will automatically start a certbot certificate renewal check
215+ after the time duration that is defined in the environmental variable
216+ ` RENEWAL_INTERVAL` has passed. After certbot has done its stuff, the code will
217+ return and wait the defined time before triggering again.
218+
219+ This process is very simple, and is just a `while [ true ];` loop with a `sleep`
220+ at the end :
221+
222+ ` ` ` bash
223+ while [ true ]; do
224+ # Run certbot...
225+ sleep "$RENEWAL_INTERVAL"
226+ done
227+ ` ` `
228+
229+ So when setting the environmental variable, it is possible to use any string
230+ that is recognized by `sleep`, e.g. `3600` or `60m` or `1h`. Read more about
231+ which values that are allowed in its
232+ [manual](http://man7.org/linux/man-pages/man1/sleep.1.html).
233+
234+ The default is `8d`, since this allows for multiple retries per month, while
235+ keeping the output in the logs at a very low level. If nothing needs to be
236+ renewed certbot won't do anything, so it should be no problem setting it lower
237+ if you want to. The only thing to think about is to not to make it longer than
238+ one month, because then you would
239+ [miss the window](https://community.letsencrypt.org/t/solved-how-often-to-renew/13678)
240+ where certbot would deem it necessary to update the certificates.
241+
242+
196243# ## Diffie-Hellman parameters
197244Regarding the Diffie-Hellman parameter it is recommended that you have one for
198245your server. However, you can make a config file without it and Nginx will work
0 commit comments