Install

sudo apt update
sudo apt install libnss3-tools -y  # Required for Firefox support
wget https://dl.filippo.io/mkcert/latest?for=linux/amd64 -O mkcert
chmod +x mkcert
sudo mv mkcert /usr/local/bin/

Create the Root CA

mkcert -install

Create a Certificate

mkcert example.com
  • This generates:
    • example.com.pem (certificate)
    • example.com-key.pem (private key)
  • These are the SSL Certs

Install the Root CA on another maschine

use mkcert -CAROOT to get the folder with the root ca. Copy the rootCa.pem to another system Import it into the system or browser’s trusted CA store:

  • Windows:
    1. Open certmgr.msc
    2. Go to Trusted Root Certification Authorities Certificates
    3. Right click All Tasks Import...
    4. Select the file and import
    5. restart your browser or your pc