←

Nginx mkcert lab

Locally trusted SSL certificates in Nginx using mkcert


Download tools

Docker

mkcert

sudo apt update && sudo apt install mkcert libnss3-tools

Install the CA into your system

mkcert -install
> mkcert -install

Created a new local CA 💥
The local CA is now installed in the system trust store! ⚡️

Create lab directory

mkdir nginx-mkcert-lab && cd nginx-mkcert-lab
mkdir certs html

Generate the certs

cd certs
> mkcert localhost 127.0.0.1


Created a new certificate valid for the following names 📜
 - "localhost"
 - "127.0.0.1"

The certificate is at "./localhost+1.pem" and the key at "./localhost+1-key.pem" ✅

It will expire on 30 September 2028 🗓