Lightsail SSL Certs (WordPress sites)

My current go-to script(s) for handling SSL Cert renewal through AWS Lightsail.

“My current goto script(s) to handle SSL Cert renewal through Lightsail”.

sudo /opt/bitnami/letsencrypt/lego --path /opt/bitnami/letsencrypt list
sudo certbot certificates
sudo /opt/bitnami/letsencrypt/lego --tls --email="EMAIL-ADDRESS" --domains="DOMAIN" --path="/opt/bitnami/letsencrypt" renew --days 90
sudo /opt/bitnami/ctlscript.sh start

DOMAIN=aetrius.dev
WILDCARD=*.$DOMAIN
sudo certbot -d $DOMAIN -d $WILDCARD --manual --preferred-challenges dns certonly

sudo /opt/bitnami/ctlscript.sh stop

sudo mv /opt/bitnami/apache2/conf/bitnami/certs/server.crt /opt/bitnami/apache2/conf/bitnami/certs/server.crt.old

sudo mv /opt/bitnami/apache2/conf/bitnami/certs/server.key /opt/bitnami/apache2/conf/bitnami/certs/server.key

sudo ln -sf /etc/letsencrypt/live/$DOMAIN/privkey.pem /opt/bitnami/apache2/conf/bitnami/certs/server.key

sudo ln -sf /etc/letsencrypt/live/$DOMAIN/fullchain.pem /opt/bitnami/apache2/conf/bitnami/certs/server.crt

sudo /opt/bitnami/ctlscript.sh start

Resources: https://repost.aws/knowledge-center/lightsail-bitnami-renew-ssl-certificate

Leave a Reply

Your email address will not be published. Required fields are marked *

Press ESC to close