mkcert
mkcert is a simple tool for making locally-trusted development certificates. It requires no configuration.
$ mkcert -install
Created a new local CA π₯
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)! π¦
$ mkcert example.com "*.example.com" example.test localhost 127.0.0.1 ::1
Created a new certificate valid for the following names π
- "example.com"
- "*.example.com"
- "example.test"
- "localhost"
- "127.0.0.1"
- "::1"
The certificate is at "./example.com+5.pem" and the key at "./example.com+5-key.pem" β
Using certificates from real certificate authorities (CAs) for development can be dangerous or impossible (for hosts like example.test
, localhost
or 127.0.0.1
), but self-signed certificates cause trust errors. Managing your own CA is the best solution, but usually involves arcane commands, specialized knowledge and manual steps.
mkcert automatically creates and installs a local CA in the systemβ¦