Custom TLS Certificates¶
It’s possible to use “real” TLS certificates issued by a CA rather than the local-development-oriented mkcert command.
- Obtain a certificate and key from Let’s Encrypt or another source.
- Install the certificate and key in your project’s
.ddev/custom_certsdirectory. - If you’re using the default Traefik (
router: traefik), the files should be named<projectname>.crtand<projectname>.key, for exampleexampleproj.crtandexampleproj.key. - If you’re using the legacy nginx-proxy router (
router: nginx-proxy) , each certificate must be named with the patternfqdn.crtandfqdn.key. A project namedexample.ddev.site, for example, would needexample.ddev.site.crtandexample.ddev.site.keyin.ddev/custom_certs. There must be one cert-set for each FQDN handled by the project. - Run
ddev startand verify using a browser that you’re using the right certificate.