To avoid the red "your connection is not encrypted" message, you'll have to add the generated .cert
to your keychain.
macOS
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain yourlocaldomain.cert
Windows
certutil -addstore -f "ROOT" yourlocaldomain.cert
Linux (Ubuntu, Debian)
Ensure the ca-certificates
package is installed (sudo apt-get install ca-certificates
) before proceeding.
# Copy .cert file to /usr/local/share/ca-certificates, and change extension to .crt
sudo cp yourlocaldomain.cert /usr/local/share/ca-certificates/yourlocaldomain.crt
# Rebuild your certificate authority, making sure to select your new .crt in the process
dpkg-reconfigure ca-certificates