Лучшая ачивка месяца
Setup https certificates auto update with crontab and letsencrypt
In simple setup with nginx in the base system and crontab scripts. And certificates in /etc/letsencrypt directory. I have /var/www/html directory with the .well-known directory. And added to nginx config such block: server { listen 80; listen [::]:80; server_name my.domain; root /var/www/html/; location /.well-known/ { root /var/www/html; allow all; } location / { if ($host = my.domain) { return 301 https://$host$request_uri; } return 404; } } And I have such lines in crontab: 40 2 * * 1 /usr/bin/docker run --rm -i -v /var/www/html/:/var/www/html -v /etc/letsencrypt/:/etc/letsencrypt -v /var/log/letsencrypt/:/var/log/letsencrypt quay.io/letsencrypt/letsencrypt certonly --webroot --webroot-path /var/www/html --agree-tos --renew-by-default -d my.domain -d www.my.domain -m me@my.domain,admin@my.domain --cert-name my.domain 45 2 * * 1 systemctl restart nginx