Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsApr 13, 2026·3 min de lectura

mkcert — Zero-Config Local HTTPS Development Certificates

mkcert is a simple tool that creates locally-trusted development certificates with zero configuration. No more browser security warnings in local development — just run mkcert and get valid HTTPS for localhost and any custom domain.

Listo para agents

Instalación con revisión previa

Este activo requiere revisión. El prompt copiado pide dry-run, muestra escrituras y continúa solo tras confirmación.

Needs Confirmation · 64/100Política: confirmar
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
step-1.md
Comando con revisión previa
npx -y tokrepo@latest install 404fae4b-372b-11f1-9bc6-00163e2b0d79 --target codex

Primero dry-run, confirma las escrituras y luego ejecuta este comando.

TL;DR
mkcert generates locally-trusted TLS certificates for development with a single command, no configuration needed.
§01

What it is

mkcert is a simple CLI tool that creates locally-trusted development certificates with zero configuration. It installs a local Certificate Authority in your system trust store, then generates certificates that browsers accept without warnings.

mkcert targets web developers who need HTTPS in local development for testing service workers, secure cookies, mixed content, or OAuth callbacks. It eliminates the pain of self-signed certificates and manual trust store management.

The project is actively maintained and suitable for both individual developers and teams looking to integrate it into their existing toolchain. Documentation and community support are available for onboarding.

§02

How it saves time or tokens

Without mkcert, setting up local HTTPS involves generating a CA, creating certificates, adding the CA to multiple trust stores, and repeating this on each machine. mkcert does all of this with mkcert -install followed by mkcert localhost. No OpenSSL commands, no manual trust store edits, no browser restarts.

§03

How to use

  1. Install mkcert via Homebrew (brew install mkcert), Chocolatey, or download from GitHub releases.
  2. Run mkcert -install once to create and install the local CA.
  3. Run mkcert localhost 127.0.0.1 ::1 to generate certificate and key files.
  4. Configure your dev server (Vite, webpack-dev-server, nginx) to use the generated .pem files.
§04

Example

# Install mkcert and set up the local CA
brew install mkcert
mkcert -install

# Generate certificates for local development
mkcert localhost 127.0.0.1 ::1 myapp.local
# Creates: localhost+3.pem and localhost+3-key.pem

# Use with Node.js
node -e "
const https = require('https');
const fs = require('fs');
https.createServer({
  key: fs.readFileSync('localhost+3-key.pem'),
  cert: fs.readFileSync('localhost+3.pem')
}, (req, res) => res.end('Hello HTTPS')).listen(443);
"
§05

Related on TokRepo

§06

Common pitfalls

  • Sharing mkcert-generated certificates across machines. The CA is local to your machine. Certificates will not be trusted on other machines unless you export and install the CA there.
  • Using mkcert certificates in production. They are signed by a local CA that public browsers do not trust. Use Let's Encrypt or a commercial CA for production.
  • Forgetting to run mkcert -install first. Without installing the local CA, generated certificates trigger the same browser warnings as self-signed certs.
  • Not reading the changelog before upgrading. Breaking changes between versions can cause unexpected failures in production. Pin your version and review release notes.

Preguntas frecuentes

Is mkcert safe to use?+

Yes, for development. mkcert creates a local CA that only your machine trusts. The CA private key stays on your disk. Do not share the CA key file, as anyone with it could generate certificates your machine would trust.

Does mkcert work on all operating systems?+

Yes. mkcert supports macOS, Linux, and Windows. It handles trust store installation for each platform automatically, including Firefox's separate certificate store via NSS.

Can I use mkcert with Docker?+

Yes. Mount the generated certificate files into your Docker container. For the container to trust the CA, you also need to mount the CA cert and run update-ca-certificates inside the container.

How is mkcert different from self-signed certificates?+

Self-signed certificates are not trusted by browsers and produce security warnings. mkcert installs a CA in your system trust store, so certificates it signs are trusted by all browsers on your machine without warnings.

Does mkcert support wildcard certificates?+

Yes. Run `mkcert '*.myapp.local'` to generate a wildcard certificate. This is useful when your local development environment uses multiple subdomains.

Referencias (3)

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados