Работа
September 4, 2018

Lets’encrypt wildcard

Клонируем certbot:

git clone https://github.com/certbot/certbot

Переходим в папку certbot и запускаем:

cd certbot
./letsencrypt-auto certonly --agree-tos --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory -d example.com -d *.example.com

В процессе будет задано несколько вопросов на которые нужно дать согласие и указать почту. После этого будет предложено создать в DNS две записи TXT вида _acme-challenge.example.com с определенной строкой. Создаем нужную запись и жмем Enter

Проверить, нормально ли создалась запись можно так:

dig -t txt _acme-challenge.example.com

После выполнения требуемых действий снова жмем Enter и если все нормально, в консоли будет что-то такое:

- Congratulations! Your certificate and chain have been saved at:
 /etc/letsencrypt/live/example.com/fullchain.pem
 Your key file has been saved at:
 /etc/letsencrypt/live/example.com/privkey.pem
 Your cert will expire on 2018-07-04. To obtain a new or tweaked
 version of this certificate in the future, simply run
 letsencrypt-auto again. To non-interactively renew *all* of your
 certificates, run "letsencrypt-auto renew"
 - If you like Certbot, please consider supporting our work by:

Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le

В cron пинать нет смысла, даже при renew необходимо создавать TXT запись.

enjoy!