You open https://myapp.localhost and the browser fills the window with a red warning. You click "Advanced", then
"Proceed anyway", and you do it again tomorrow. Then a service worker, a secure cookie or an OAuth callback refuses to
work at all, and clicking through stops being enough.
The fix is not a browser flag. It is a small certificate authority of your own, and it takes about ten minutes to understand properly.
The browser was right to warn you
A certificate says "this key belongs to myapp.localhost". On its own that is only a claim. A browser believes it
when the certificate is signed by an authority it already trusts, and it keeps a list of those authorities.
A self-signed certificate is signed by nobody on that list, so the browser cannot tell your dev server from someone sitting in the middle of the connection. The warning is the browser doing its job.
A local CA is one more name on that list
No public authority will sign a certificate for myapp.localhost: nobody can own that name. So you make your own
authority, add it to the trust list on your computer only, and let it sign a certificate for each local site.
With OpenSSL the whole thing is four commands:
# 1. The authority: a key and a certificate that signs itself
openssl req -x509 -newkey rsa:2048 -nodes -days 3650 \
-keyout ca.key -out ca.crt -subj "/CN=My Local CA"
# 2. A key and a signing request for one site
openssl req -newkey rsa:2048 -nodes \
-keyout site.key -out site.csr -subj "/CN=myapp.localhost"
# 3. The CA signs it. Browsers read the name from subjectAltName, not CN
printf "subjectAltName=DNS:myapp.localhost" > san.ext
openssl x509 -req -in site.csr -CA ca.crt -CAkey ca.key \
-CAcreateserial -days 397 -extfile san.ext -out site.crt
Your dev server uses site.key and site.crt. Nothing trusts them yet.
Where trust lives is different on every system
This is the part that trips people up: there is no single trust list.
| System | Where the CA goes | Command |
|---|---|---|
| macOS | Your login keychain | security add-trusted-cert -r trustRoot -k ~/Library/Keychains/login.keychain-db ca.crt |
| Windows | Your user's Trusted Root certificates | certutil -user -addstore Root ca.crt |
| Debian, Ubuntu | The system store | copy to /usr/local/share/ca-certificates/, then sudo update-ca-certificates |
| Fedora | The system store | copy to /etc/pki/ca-trust/source/anchors/, then sudo update-ca-trust |
On Linux the system store is not the end of it. Chrome and Firefox each keep their own certificate database (NSS),
and they need the CA too. The tool is certutil from libnss3-tools, which shares a name with the Windows one and
nothing else:
# Chrome / Chromium
certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n "My Local CA" -i ca.crt
# Firefox: once per profile folder
certutil -d sql:/path/to/firefox/profile -A -t "C,," -n "My Local CA" -i ca.crt
On macOS and Windows, Firefox also uses its own store. Either import ca.crt in its certificate settings, or set
security.enterprise_roots.enabled to true in about:config so it reads the system's list.
Some runtimes ignore all of this. A Node.js app that calls your HTTPS site needs NODE_EXTRA_CA_CERTS pointing at
ca.crt.
The one file you must never share
ca.crt is public. ca.key is not.
Anyone who can read your CA's private key can make a certificate for any website, and your browser will accept it.
So treat ca.key like an SSH key. Keep it readable only by you, never commit it, never copy it to a teammate so "we
all have the same CA". Each computer makes its own. And when you stop using the CA, remove it from the trust list
rather than leaving it there.
What a local CA does not do
It makes HTTPS work on your computer. A phone on the same Wi-Fi, a colleague or a webhook provider does not trust your CA and should not. For those you need a real certificate on a public name, which is what a tunnel gives you.
How DevCatz does it
DevCatz does the steps above for you. It makes its own authority, DevCatz Local CA, valid for 10 years, and makes a certificate for each host on demand when a browser asks for that name, valid for 397 days.

You trust it once: in the Welcome dialog, or under Settings → Project → HTTPS certificates → Trust certificate authority…. The steps are shown while it works, and where it lands depends on the system:
- macOS: your login keychain, for your user only. macOS asks for your password or Touch ID.
- Windows: your own Trusted Root certificates, with no administrator rights. Windows asks install this certificate? once.
- Linux: the system store (your password once), then Chrome, Chromium and every Firefox profile through
certutil— deb, snap and Flatpak installs alike. The confirmation button reads Trust it. A Firefox profile you create later gets the CA within half a minute, without a password.
Node.js and Bun get the CA too. The key stays in DevCatz's own certs folder, readable only by you, and never
leaves your computer.
Undo is one button in the same place: Remove from keychain, Remove from Windows or Remove from the certificate stores.
One honest limit: on macOS and Windows, Firefox still needs the manual step above. And on Linux, a browser you install later needs Trust certificate authority… again.
If you want to see it end to end with a real project, Laravel + Vite on https://app.localhost walks through it.
Try it
Make a CA by hand once with the commands above; it is the quickest way to stop being afraid of certificate errors. Then let a tool do it.
- Download: catzoid.com/devcatz/download
- Docs: HTTPS and the local certificate and what trusting the CA changes
- Source (GPL-3.0): github.com/catzoidhub/DevCatz
