0

When I try to do a docker-compose up -d with a custom domain for my local instance, the environment is created successfully but I get a certificate error when I try to load the site or the Identity Server:

This CA Root certificate is not trusted. To enable trust, install this certificate in the Trusted Root Certification Authorities store.
Issued to: TRAEFIK DEFAULT CERT
Issued by: TRAEFIK DEFAULT CERT

Certificate error (CA Root certificate is not trusted)

What I customized:

  • .env file:
    • Updated CM_HOST and ID_HOST environment variables to custom domains
  • init.ps1 script:
    • Updated & $mkcert -cert-file xp0cm.localhost.crt -key-file xp0cm.localhost.key "xp0cm.localhost" line to use custom domain for Sitecore instance
    • Updated $mkcert -cert-file xp0id.localhost.crt -key-file xp0id.localhost.key "xp0id.localhost" line to use custom domain for Identity Server instance
1

Update the certificate file names in the .\traefik\config\dynamic\certs_config.yaml file with the custom domain names you used when defining the -cert-file and -key-file arguments in init.ps1:

.\traefik\config\dynamic\certs_config.yaml

tls:
  certificates:
    - certFile: C:\etc\traefik\certs\custom.domain.sc.crt
      keyFile: C:\etc\traefik\certs\custom.domain.sc.key
    - certFile: C:\etc\traefik\certs\custom.domain.id.crt
      keyFile: C:\etc\traefik\certs\custom.domain.id.key

If your existing environment is still running, you will need to stop and clean it first:

docker-compose down
.\clean.ps1

Then you can compose it with these new cert file names:

docker-compose up -d

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.