Skip to content

Instantly share code, notes, and snippets.

@unculturedswine
Created August 3, 2021 15:29
Show Gist options
  • Save unculturedswine/3858ddd85dd96614d07a7ec49ed675fe to your computer and use it in GitHub Desktop.
Save unculturedswine/3858ddd85dd96614d07a7ec49ed675fe to your computer and use it in GitHub Desktop.
When Easy Engine V3 Default Lets Encrypt stops renewing certs - Install and start using the acme.sh protocol
# clone the repository
git clone https://github.com/Neilpang/acme.sh.git /opt/acme.sh -q
# create conf directory
mkdir -p /etc/letsencrypt/{config,live,renewal}
# install acme.sh
cd /opt/acme.sh
./acme.sh --install \
--home /etc/letsencrypt \
--config-home /etc/letsencrypt/config \
--cert-home /etc/letsencrypt/renewal
# enable auto-upgrade
/etc/letsencrypt/acme.sh --config-home '/etc/letsencrypt/config' --upgrade --auto-upgrade
# create .well-known directory
mkdir -p /var/www/html/.well-known/acme-challenge
# set www-data as owner
chown -R www-data:www-data /var/www/html /var/www/html/.well-known
# set permissions
chmod 750 /var/www/html /var/www/html/.well-known
#################### REBOOT
acme.sh --register-account -m EMAIL@EMAIL.COM
acme.sh --issue -d WEBSITE.COM -d www.WEBSITE.COM -w /var/www/WEBSITE.COM/htdocs
rm -r /etc/letsencrypt/live/WEBSITE.COM/cert.pem /etc/letsencrypt/live/WEBSITE.COM/chain.pem /etc/letsencrypt/live/WEBSITE.COM/privkey.pem /etc/letsencrypt/live/WEBSITE.COM/fullchain.pem
acme.sh --install-cert -d WEBSITE.COM \
--key-file /etc/letsencrypt/live/WEBSITE.COM/privkey.pem \
--cert-file /etc/letsencrypt/live/WEBSITE.COM/cert.pem \
--fullchain-file /etc/letsencrypt/live/WEBSITE.COM/fullchain.pem \
--reloadcmd "ee stack restart --nginx"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment