documentation/infra/letsencrypt.md

43 lines
716 B
Markdown
Raw Normal View History

2021-10-22 15:38:41 +02:00
# Let's encrypt
# Installation
Installer les paquets :
```
apt-get install dehydrated dehydrated-apache2
```
Recharger Apache :
```
systemctl reload apache2.service
```
```
/usr/bin/dehydrated --register --accept-terms
```
# Générer un certificat
Ajouter foo.libre-service.eu dans `/etc/dehydrated/domains.txt`.
Lancer la génération :
```
/usr/bin/dehydrated -c
```
2022-01-19 15:16:19 +01:00
Le certificat est généré dans `/var/lib/dehydrated/certs/foo.libre-service.eu/`.
# Renouvellement automatique
Ajouter un script cron dans `/etc/cron.weekly/dehydrated` :
```
#!/bin/bash
/usr/bin/dehydrated -c
systemctl reload apache2.service
```
Et lui donner les bonnes permissions :
```
chmod a+rx /etc/cron.weekly/dehydrated
```