GitHubFound

Local HTTPS with Traefik + mkcert

A pattern (and a solid reference repo) for *.docker.localhost domains with trusted certificates — zero per-project config.

dockertraefikdxnetworking

This is a project I found and recommend — I am not the author (community pattern). Original source: repository.

The problem

Every side project wants port 3000. Browser trust is a mess. Copy-pasting nginx configs between repos is how weekends disappear.

The pattern

Run a single Traefik instance on your machine. Point *.docker.localhost at it with certificates from mkcert. Each project only needs a couple of labels.

I first saw a clean packaging of this idea in fkrzski/docker-proxy — worth reading even if you roll your own.

What I use day to day

  • One compose stack always on
  • Project networks attach to it
  • HTTPS URLs that feel like production

Not glamorous. Extremely sticky once you have it.