Issuing SSL Server Certificates for Local Environment with mkcert

Tadashi Shigeoka ·  Tue, March 30, 2021

I’ll show you how to issue SSL/TLS server certificates for local environments using mkcert.

Background: Want to Use SSL Server Certificates on localhost

I encountered a situation where I needed to use SSL server certificates for web application development on the local environment (localhost), so I issued them using mkcert.

Installing mkcert

Installing mkcert on macOS

brew install mkcert

Creating a Certificate Authority in Local Environment

Create a certificate authority in the local environment.

mkcert -install

Issuing SSL Certificates

Issuing SSL Server Certificate with localhost Only

mkcert localhost

Issuing SSL Server Certificate with Multiple Domains and IP Addresses

mkcert localhost *.localhost example.com *.example.com 127.0.0.1

That’s all from the Gemba.