Skip to content

πŸ› οΈ Local HTTPS SSL Setup for (macOS DDEV)

Thomas Fink edited this page Apr 1, 2025 · 1 revision

To access your local DDEV environment at https://zms.ddev.site without SSL errors on macOS, follow these steps:


βœ… Requirements


πŸ“¦ 1. Install mkcert and its dependencies

brew install mkcert
brew install nss # optional, for Firefox support
mkcert -install

πŸ— 2. Create the SSL directory (if it doesn’t exist)

mkdir -p ~/.ddev/global_config/ssl

πŸ” 3. Generate SSL cert and key for your project domain

mkcert -cert-file ~/.ddev/global_config/ssl/zms.ddev.site.crt \
       -key-file ~/.ddev/global_config/ssl/zms.ddev.site.key \
       zms.ddev.site

πŸ›‘ 4. Trust the mkcert Root CA (required by macOS)

sudo security add-trusted-cert -d -r trustRoot \
      -k /Library/Keychains/System.keychain \
      "$(mkcert -CAROOT)/rootCA.pem"

This step allows macOS to trust all certificates created by mkcert.


πŸš€ 5. Restart DDEV to pick up the new certificate

ddev restart

🌍 6. Access the project securely

Now visit:

https://zms.ddev.site

Or access your API directly:

https://zms.ddev.site/terminvereinbarung/api/citizen/offices-and-services/

βœ… You should not see any SSL errors in your browser.


🦊 Firefox Users

To enable trusted certs in Firefox:

  1. Visit about:config
  2. Search: security.enterprise_roots.enabled
  3. Set it to true
  4. Restart Firefox

πŸ§ͺ Test with curl (optional)

curl -I https://zms.ddev.site

You should see a 200 OK or redirect response without SSL errors.