Skip to content

Instantly share code, notes, and snippets.

@caryyu
Created November 5, 2022 12:24
Show Gist options
  • Save caryyu/35e0c2f05b5ec82afe54f76cde7db776 to your computer and use it in GitHub Desktop.
Save caryyu/35e0c2f05b5ec82afe54f76cde7db776 to your computer and use it in GitHub Desktop.
Using Certbot to create HTTPS certificates

Ensure the domain resolution is managed by the alicloud.

Create

docker run -it --rm \
-e "ALIYUN_AK=<access_key>" \
-e "ALIYUN_SK=<secret_key>" \
-e "EMAIL=<contact email>" \
-v /var/local/certs:/etc/letsencrypt acbig/certbot-dns-aliyun:1.0.0 obtain_cert \
-d "caryyu.top" \
-d "*.caryyu.top"

Note: the path /var/local/certs is your host disk where the certificates are stored into.

Renew

docker run -it --rm \
-e "ALIYUN_AK=<access_key>" \
-e "ALIYUN_SK=<secret_key>" \
-e "EMAIL=<contact email>" \
-v /var/local/certs:/etc/letsencrypt acbig/certbot-dns-aliyun:1.0.0 renew_certs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment