You'll need:
- A paid ngrok account
- A reserved domain on ngrok, e.g. the FQDN you're generating certs for
- A registed domain and access to change DNS records
- Install certbot and ngrok
brew cask install certbot ngrok
- Login to ngrok:
ngrok authtoken <YOUR_AUTH_TOKEN>
- Define a reserved domain in ngrok for the FQDN in question
- Update DNS to point at ngrok CNAME
- Start ngrok HTTP tunnel for hostname on port 80
ngrok http -hostname=your.fqdn.com 80
- Letsencrypt standalone webserver using HTTP port 80
sudo certbot certonly --standalone-supported-challenges http-01
- Generated certificates will be in
/etc/letsencrypt/archive/your.fqdn.com