summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPierre Langlois <pierre.langlois@gmx.com>2021-03-14 13:15:43 +0000
committerMaxim Cournoyer <maxim@guixotic.coop>2025-07-08 16:54:06 +0900
commit57fc58ba485caecdb6910d3609abb974cb167068 (patch)
tree58cb436e8a7ed27ec1d6ce24f05e59d0fca779e5 /doc
parentc603068f6f52b0d600809cc6eb857f9b68be8421 (diff)
services: certbot: Add dry-run? certificate option.
* gnu/services/certbot.scm (certificate-configuration): Add dry-run? field. (certbot-command): Use it to pass --dry-run to certbot. * doc/guix.texi (Certificate Services): Document dry-run? option. Change-Id: I26b0dc06e2b7e5fb34305deee09e311d085f8a4b Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop> Modified-by: Maxim Cournoyer <maxim@guixotic.coop>
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 0b4c3ceac6d..d03924ea967 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -35816,6 +35816,41 @@ certificates and keys; the shell variable @code{$RENEWED_DOMAINS} will
35816contain a space-delimited list of renewed certificate domains (for 35816contain a space-delimited list of renewed certificate domains (for
35817example, @samp{"example.com www.example.com"}. 35817example, @samp{"example.com www.example.com"}.
35818 35818
35819@item @code{dry-run?} (default: @code{#f})
35820Communicate with the ACME server but do not update certificates nor
35821trigger @code{deploy-hook}. This is useful as a temporary setting to
35822test the challenge procedure, especially the @code{authentication-hook}
35823and @code{cleanup-hook} while working on them. It's also a good idea to
35824use the Let's Encrypt staging server at
35825@url{https://acme-staging-v02.api.letsencrypt.org/directory} while
35826testing, which allows for higher rate limits, but with which
35827@code{certbot} will helpfully refuse to update certificates and
35828recommend the @code{dry-run?} option. For example:
35829
35830@lisp
35831(define %authentication-hook
35832 (program-file "authentication-hook"
35833 #~(let ((domain (getenv "CERTBOT_DOMAIN"))
35834 (token (getenv "CERTBOT_TOKEN")))
35835 (format #t "Hey, can you authenticate ~a with ~a for me?"
35836 domain token))))
35837
35838(define %cleanup-hook
35839 (program-file "authentication-hook"
35840 #~(display "Bye")))
35841
35842(service certbot-service-type
35843 (certbot-configuration
35844 (server "https://acme-staging-v02.api.letsencrypt.org/directory")
35845 (certificates
35846 (list
35847 (certificate-configuration
35848 (dry-run? #t)
35849 (authentication-hook %authentication-hook)
35850 (cleanup-hook %cleanup-hook)
35851 (domains '("example.net" "www.example.net")))))))
35852@end lisp
35853
35819@item @code{start-self-signed?} (default: @code{#t}) 35854@item @code{start-self-signed?} (default: @code{#t})
35820Whether to generate an initial self-signed certificate during system 35855Whether to generate an initial self-signed certificate during system
35821activation. This option is particularly useful to allow @code{nginx} to 35856activation. This option is particularly useful to allow @code{nginx} to