From 4f965f38718a699252facf3c7287aa352471e2d2 Mon Sep 17 00:00:00 2001 From: buchel_k Date: Wed, 11 Mar 2026 08:27:11 +0100 Subject: [PATCH] make it more clear --- docs/admin-guide/configuration/https/acme.md | 24 +++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/admin-guide/configuration/https/acme.md b/docs/admin-guide/configuration/https/acme.md index 9d15e6f1..3a9a2666 100644 --- a/docs/admin-guide/configuration/https/acme.md +++ b/docs/admin-guide/configuration/https/acme.md @@ -1,15 +1,27 @@ # ACME - Automatic HTTPS Certificates -Until there is an puppet module to configure ACME via certbot, these are the steps needed to configure ACME (for nginx). +Until there is a custom puppet module to configure ACME via certbot, it is possible to do this with already existing Hiera/Puppet features. +Below you find two configuration examples: + +- normal webserver (here `nginx`) +- docker service (also `nginx`) + +Note that instead of `nginx` this can be adapted to any other type of (web)service requiring TLS/SSL certificates and +these are the steps needed to configure ACME (for nginx). Configuration with docker is down below. +## Configuration for Webserver/Webservice + +Following steps are required, except step number 4, all can be automated via Hiera and Puppet: + + 1. Install certbot 2. Create a /etc/letsencrypt/cli.ini file 3. (optional) Create a post hook script to reload nginx after certificate renewal 4. Request the certificate once via the certbot command 5. Enable the certbot renewal timer -  -Except step number 4, all the above can be automated via Hiera and Puppet as follows: + +Hiera example: ```yaml # Install certbot and nginx packages @@ -36,14 +48,14 @@ files::files: key-type = ecdsa elliptic-curve = secp384r1 # Register e-mail - email = linux-eng@psi.ch + email = $YOUR_TEAM_EMAIL_ADDRESS # We don't read it anyways agree-tos = true # Server configuration. This is the same for everyone server = https://one.digicert.com/mpki/api/v1/acme/v2/directory # Server authentication. Due to having this, we do not need to do a DNS challenge. - eab-kid = pass - eab-hmac-key = pass + eab-kid = $ID_YOU_GET_FROM_NETWORK_TEAM + eab-hmac-key = $KEY_YOU_GET_FROM_NETWORK_TEAM # Post hook to reload nginx after certificate renewal /etc/letsencrypt/renewal-hooks/post/nginx.sh: mode: "0544"