CDIST-TYPE__LETSENCRYPT_CERT(7)
π cdist-type__letsencrypt_cert β the cdist-type__letsencrypt_cert(7) moment π
okay bestie so this is the manual page for cdist-type__letsencrypt_cert(7), section 7, and it's genuinely giving "get your SSL certs sorted and never think about it again" energy β¨
πΈ NAME πΈ
cdist-type__letsencrypt_cert β get an SSL certificate from Let's Encrypt. no cap, that's the whole job π
π¦ DESCRIPTION π¦
So basically this type automatically obtains a Let's Encrypt SSL certificate using Certbot. You don't do the whole "openssl genrsa" ritual, it just handles it for you π
This type attempts to setup automatic renewals always. Like, always. On many Linux distributions that's already the case out of the box, check here if you wanna see:
https://certbot.eff.org/docs/using.html#automated-renewals
For Alpine Linux and Arch Linux, we set up a system-wide cronjob that tries to renew certificates daily. every day. main character scheduling honestly π«Ά
If you're on FreeBSD, we configure periodic(8) exactly as recommended by the port mantainer, so you get a weekly attempt at renewal. one vibe check per week, slay π
β οΈ If your OS is not mentioned here or on Certbot's docs as having support for automated renewals, please make sure you check your OS and possibly patch this type so the system-wide cronjob is installed. do not just assume the vibes are immaculate, bestie π
π REQUIRED PARAMETERS π
You literally cannot skip these, they're required, periodt.
object idβ a cert name. If thedomainparameter is not specified then it is used as a domain to be included in the certificate. so it's the name and sometimes the domain, it's multitasking πadmin-emailβ where to send Let's Encrypt emails like "certificate needs renewal". yes they email you, it's giving "your subscription is expiring" but make it TLS π§
β¨ OPTIONAL PARAMETERS β¨
These are the "you can but you don't have to" girlies.
stateβ'present'or'absent', defaults to'present'where:presentβ if the certificate does not exist, it will be obtained πabsentβ the certificate will be removed. bye bestie π
webrootβ the path to your webroot, as set up in your webserver config. If this parameter is not present, Certbot will be run in standalone mode. so either you point it at your webroot or it does its own thing π¦
π OPTIONAL MULTIPLE PARAMETERS π
These ones you can pass more than once. iconic behavior tbh.
domainβ domains to be included in the certificate. When specified thenobject idis not used as a domain. heads up: the object id stops pulling double duty the second you do this βdeploy-hookβ a command to be executed only when the certificate associated with this$__object_idis issued or renewed. You can specify it multiple times, but any failure will prevent further commands from being executed. so if one flops, the rest don't get their turn π
For this command, the shell variable $RENEWED_LINEAGE will point to the config live subdirectory (for example, /etc/letsencrypt/live/${__object_id}) containing the new certificates and keys; the shell variable $RENEWED_DOMAINS will contain a space-delimited list of renewed certificate domains (for example, example.com www.example.com). free variables, no setup, we love to see it π
pre-hookβ a command to be run in a shell before obtaining any certificates. You can specify it multiple times, but any failure will prevent further commands from being executed.
Note these run regardless of which certificate is attempted, you may want to manage these system-wide hooks with __file in /etc/letsencrypt/renewal-hooks/pre/.
Intended primarily for renewal, where it can be used to temporarily shut down a webserver that might conflict with the standalone plugin. This will only be called if a certificate is actually to be obtained/renewed. so it's not just out here running for fun π«Ά
post-hookβ a command to be run in a shell after attempting to obtain/renew certificates. You can specify it multiple times, but any failure will prevent further commands from being executed.
Note these run regardless of which certificate was attempted, you may want to manage these system-wide hooks with __file in /etc/letsencrypt/renewal-hooks/post/.
Can be used to deploy renewed certificates, or to restart any servers that were stopped by --pre-hook. This is only run if an attempt was made to obtain/renew a certificate. it's the cleanup crew, the afterparty, the closer π
π₯ BOOLEAN PARAMETERS π₯
stagingβ obtain a test certificate from a staging server. practice round, no cap π
π MESSAGES π
changeβ Certificate was changed.createβ Certificate was created.removeβ Certificate was removed.
πΈ EXAMPLES πΈ
okay here's where it gets real, copy these exactly bestie β¨
# use object id as domain
__letsencrypt_cert example.com \
--admin-email root@example.com \
--deploy-hook "service nginx reload" \
--webroot /data/letsencrypt/root
# domain parameter is specified so object id is not used as domain
# and example.com needs to be included again with domain parameter
__letsencrypt_cert example.com \
--admin-email root@example.com \
--domain example.com \
--domain foo.example.com \
--domain bar.example.com \
--deploy-hook "service nginx reload" \
--webroot /data/letsencrypt/root
like, notice how in the second one example.com has to show up again as a --domain because the object id stopped counting as a domain. the way that's such a gotcha π read the comment, it's there for a reason π«Ά
π AUTHORS π
- Nico Schottelius <nico-cdist--@--schottelius.org>
- Kamila SouΔkovΓ‘ <kamila--@--ksp.sk>
- Darko Poljak <darko.poljak--@--gmail.com>
- Δ½ubomΓr KuΔera <lubomir.kucera.jr at gmail.com>
- Evilham <contact@evilham.com>
the icons who wrote this fr fr π
π COPYING π
Copyright (C) 2017-2021 Nico Schottelius, Kamila SouΔkovΓ‘, Darko Poljak and Δ½ubomΓr KuΔera. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
π COPYRIGHT π
ungleich GmbH 2021
and that's the whole page, bestie!! π version 7.0.0, dated Jul 31, 2022 β shoutout to the cdist crew, go get those certs, you're doing amazing sweetie π β¨π¦πΈπ
π¦ where this page comes from
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms