Reference: https://aws.amazon.com/premiumsupport/knowledge-center/lightsail-bitnami-renew-ssl-certificate/
To renew your Let’s Encrypt certificate on a Bitnami LightSail WordPress instance:
- SSH into the instance and follow these steps.
- Review the reference listed above as a guide, before continuing.
- Note: The steps below are used if the bncert-tool or Lego provided by Bitnami was used to request the certificate.
- Replace <DOMAIN> with your domain name.
- Replace <EMAIL> with your email address.
sudo grep -irl "$(openssl s_client -verify_quiet -showcerts -connect <DOMAIN>:443 2>/dev/null | sed -n '/BEGIN/,/END/{p;/END/q}' | head -n 3 | tail -n 2)" /opt/bitnami/letsencrypt /etc/letsencrypt
sudo /opt/bitnami/letsencrypt/lego --path /opt/bitnami/letsencrypt list
sudo /opt/bitnami/ctlscript.sh stop
sudo /opt/bitnami/letsencrypt/lego --tls --email="<EMAIL>" --domains="<DOMAIN>" --path="/opt/bitnami/letsencrypt" renew --days 90
sudo /opt/bitnami/letsencrypt/lego --path /opt/bitnami/letsencrypt list
sudo /opt/bitnami/ctlscript.sh start