By Dang Minh Tam, Alibaba Cloud Solutions Architect of Vietnam
Let's Encrypt is a free, automated, and open certificate authority brought to you by the nonprofit Internet Security Research Group (ISRG). Let's Encrypt also provides a normal SSL certificate and a wildcard SSL certificate. However, each SSL certificate just has 3 months of availability. This article guides you to set up the Let’s Encrypt certbot on Alibaba Cloud ECS to renew your SSL certificate every 3 months automatically.
Requirements:
Process:
You need an Alibaba Cloud ECS server to install the Let’s Encrypt certbot to renew your SSL certificate. You can read here to know how to create an Alibaba Cloud ECS with Ubuntu 22.04 OS.
You need to own a DNS domain. Let’s Encrypt will add some records to your DNS domain to verify the ownership. You can read here (Checking, Setting, and Changing DNS Records) to know how to purchase and manage a DNS domain on Alibaba Cloud.
You open remote access to your ECS via Workbench in the Alibaba Cloud console.
You install the Let’s Encrypt certbot into your ECS
# sudo -i
# snap install core
# snap refresh core
# snap install --classic certbot
# ln -s /snap/bin/certbot /usr/bin/certbot
# snap set certbot trust-plugin-with-root=ok
# snap install certbot-dns-aliyun
# snap set certbot trust-plugin-with-root=ok
# snap connect certbot:plugin certbot-dns-aliyun
# /snap/bin/certbot plugins
# mkdir /opt/certbot_dns/
# vi /opt/certbot_dns/credentials.ini
# chmod 600 /opt/certbot_dns/credentials.ini
# certbot certonly --authenticator=dns-aliyun --dns-aliyun-credentials='/opt/certbot_dns/credentials.ini' -d alibabacloudvn.top -d "*.alibabacloudvn.top"
You will have 4 SSL certificates are saved at: /etc/letsencrypt/live/alibabacloudvn.top/
These certificates will be expired in next 3 months. You use this command below to setup auto renewal
# certbot renew --dry-run
The command to renew certbot is installed in one of the following locations:
/etc/crontab/
/etc/cron./
systemctl list-timers
You complete the certbot system to auto-renewal your SSL certificates every 3 months. You can upload your SSL certificates to use in another system too.
Cài đặt tự động gia hạn SSL certificate của Let’s Encrypt trên Alibaba Cloud
50 posts | 7 followers
FollowAlibaba Cloud Community - June 16, 2023
Alibaba Clouder - May 11, 2018
Alibaba Clouder - May 29, 2018
liptanbiswas - July 15, 2018
Alibaba Clouder - August 2, 2019
Alibaba Clouder - June 25, 2018
50 posts | 7 followers
FollowIndustry-standard hardware security modules (HSMs) deployed on Alibaba Cloud.
Learn MoreTair is a Redis-compatible in-memory database service that provides a variety of data structures and enterprise-level capabilities.
Learn MoreMore Posts by Alibaba Cloud Vietnam