Let's Encrypt issue when adding new domain to multisite

Just got to this part of my multisite journey and was able to figure it out without a complete reprovision. Here’s what I did:

  1. SSH to remote.
  2. $ sudo rm -rf /var/lib/letsencrypt /usr/local/letsencrypt /srv/www/letsencrypt /etc/nginx/ssl/letsencrypt /etc/ssl/certs/lets-encrypt-x3-cross-signed.pem which should remove all remnants of the existing certificates.
  3. On local machine in your Trellis project dir run $ ansible-playbook server.yml -e environment=<YOUR_ENV_NAME> --tags "letsencrypt" which should generate new certificates.
  4. It wasn’t necessary on my setup, but power cycling your remote may be necessary in some cases: $ sudo shutdown -r now.

After that my main domain and subdomain were all super green :thumbsup:

11 Likes