📜Create local self-signed certificate
Use mkcert
https://github.com/FiloSottile/mkcert
Install
brew install mkcert
brew install nss
mkcert -install
$ mkcert -install
Created a new local CA at "/Users/zander/Library/Application Support/mkcert" 💥
The local CA is now installed in the system trust store! ⚡️
The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊
Run
mkcert localhost 127.0.0.1 ::1
$ mkcert localhost 127.0.0.1 ::1
Using the local CA at "/Users/zander/Library/Application Support/mkcert" ✨
Created a new certificate valid for the following names 📜
- "localhost"
- "127.0.0.1"
- "::1"
The certificate is at "./localhost+2.pem" and the key at "./localhost+2-key.pem" ✅
This will add the certificate and key into whichever directory you ran the script in
Use openssl
Run this then follow the instructions.
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./server.key -out ./server.crt
This is not nearly as good as mkcert though.