Simplify Local HTTPS with mkcert: Fast, Trusted SSL/TLS Certificates

This guide introduces mkcert, a free open‑source tool that quickly creates locally trusted SSL/TLS certificates, outlines its key features, provides step‑by‑step installation and usage instructions—including Nginx configuration—and explains how it streamlines secure development environments.

Open Source Linux
Open Source Linux
Open Source Linux
Simplify Local HTTPS with mkcert: Fast, Trusted SSL/TLS Certificates

What is mkcert?

mkcert is a free open‑source tool developed by Filippo Valsorda that generates locally trusted SSL/TLS certificates. It creates and installs a local CA with a single command, making HTTPS setup in development environments effortless. It supports multiple operating systems.

mkcert’s achievements

With a simple and efficient design, mkcert has earned 49.2K stars on GitHub, becoming a favorite among developers for local SSL needs.

Main features

1. Zero‑configuration, saves time

After installing mkcert, a few commands generate and trust certificates, eliminating manual configuration.

2. Supports multiple domains and IPs

mkcert can issue certificates for localhost, custom domains, and IP addresses, covering diverse testing scenarios.

3. Cross‑platform

Available on Linux, macOS, and Windows.

4. Advanced functions

Can also create client authentication certificates, ECDSA keys, PKCS#12 files, and other advanced assets for complex scenarios.

Installation and usage

1. Install mkcert

Download the pre‑compiled binary for your OS from the GitHub releases page. mkcert -install On macOS you can use Homebrew:

brew install mkcert
brew install nss # if you use Firefox

2. Generate a certificate

Run, for example: mkcert example.com localhost 127.0.0.1 This creates example.com+1.pem (certificate) and example.com+1-key.pem (private key) which can be used in server configurations.

3. Configure Nginx

Place the generated files in your server and add them to the Nginx configuration:

server {
    listen 443 ssl;
    server_name example.com;

    ssl_certificate /path/to/example.com+1.pem;  # certificate file
    ssl_certificate_key /path/to/example.com+1-key.pem;  # private key

    # other configuration...
}

Reload Nginx and access the site via HTTPS.

Conclusion

mkcert makes generating and managing SSL certificates simple, boosting productivity for developers who need to test HTTPS locally while maintaining security.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

HTTPSSSLLocal Developmentmkcertcertificate generation
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.