Skip to content

Instantly share code, notes, and snippets.

@seanknox
Last active March 14, 2020 21:24
Show Gist options
  • Save seanknox/4c3b457e5bf4895865825d238c32bd1f to your computer and use it in GitHub Desktop.
Save seanknox/4c3b457e5bf4895865825d238c32bd1f to your computer and use it in GitHub Desktop.

Prerequisites:

You'll need:

  1. A paid ngrok account
  2. A reserved domain on ngrok, e.g. the FQDN you're generating certs for
  3. A registed domain and access to change DNS records

How to

  1. Install certbot and ngrok
  • brew cask install certbot ngrok
  1. Login to ngrok:
  • ngrok authtoken <YOUR_AUTH_TOKEN>
  1. Define a reserved domain in ngrok for the FQDN in question
  2. Update DNS to point at ngrok CNAME
  3. Start ngrok HTTP tunnel for hostname on port 80
  • ngrok http -hostname=your.fqdn.com 80
  1. Letsencrypt standalone webserver using HTTP port 80
  • sudo certbot certonly --standalone-supported-challenges http-01
  1. Generated certificates will be in /etc/letsencrypt/archive/your.fqdn.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment