Installing a Let’s Encrypt Certificate on macOS Server

This post was published more than a few years ago (on 2017-04-15) and may contain inaccurate technical information, outmoded thoughts, or cringe takes. Proceed at your own risk.

I have had a hell of a time finding a way to install a Let’s Encrypt certificate on macOS Server the Right Way™, due to how Server customizes the Apache config in weird and annoying ways.

For the moment, I am going to use this way to “trick” certbot into issuing the cert to a different server temporarily running on the same machine. Adapted from the very helpful instructions at Denis Gladkikh’s blog.