Using acme to manage Let’s Encrypt certificate.
Install acme.
curl https://get.acme.sh | shIssue a certificate (change parameters if you want different certificate)
acme.sh --issue --dns dns_ali -d example.com -k 4096 --logInstall the certificate to specific folder
acme.sh --installcert --nocron -d example.com --fullchainpath /home/wumo/cert/example.com.crt --keypath /home/wumo/cert/example.com.key --reloadcmd "sudo gitlab-ctl hup nginx"Note: change --fullchainpath and --keypath to your folder. change --reloadcmd to your app-reload cmd.
If the --reloadcmd needs sudo permission, then you need to remove default user crontab job and manaually create a sudo user crontab job:
sudo crontab -e
32 0 * * * "/home/wumo/.acme.sh"/acme.sh --cron --home "/home/wumo/.acme.sh" >> /home/wumo/.acme.sh/cron.log 2>&1