Local TLS Certs With mkcert
Generate browser-trusted certificates for local development hosts.
Run mkcert localhost 127.0.0.1 to create a certificate and key trusted by your machine.
01Command
Command
$ mkcert localhost 127.0.0.102What it does
mkcert creates and installs a local CA, then signs certificates for the names you pass, which browsers on that machine trust automatically. That removes the constant warning when developing HTTPS locally without weakening real certificate validation.
03Risk
!Warning: The local CA is trusted system-wide; never share the generated CA key, and remove it if the machine is repurposed.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Debian package: mkcertEvidence: Debian packages mkcert, which issues locally trusted development certificates.
- mkcertEvidence: Debian packages mkcert, which issues locally trusted development certificates.
Last verified: 2026-09-22 · Category: Security & Privacy