AdrienPoupa / docker-compose-nas

Simple Docker Compose NAS featuring Sonarr, Radarr, Prowlarr, Jellyfin, qBittorrent, PIA VPN and Traefik with SSL support
893 stars 116 forks source link

traefik container "Unable to obtain ACME certificate for domains" #12

Closed LukasSchwarzlmueller closed 1 year ago

LukasSchwarzlmueller commented 1 year ago

Hi, seem to be unable to get the docker image to run. The traefik container always fails with this log:

"""
time="2023-05-13T22:04:30Z" level=info msg="Configuration loaded from flags." time="2023-05-13T22:04:33Z" level=error msg="Unable to obtain ACME certificate for domains \"localhost\": cannot get ACME client ACME challenge not specified, please select TLS or HTTP or DNS Challenge" routerName=jellyfin@docker rule="(Host(localhost) && PathPrefix(/jellyfin))" providerName=myresolver.acme ACME CA="https://acme-v02.api.letsencrypt.org/directory" time="2023-05-13T22:04:35Z" level=error msg="Unable to obtain ACME certificate for domains \"localhost\": cannot get ACME client ACME challenge not specified, please select TLS or HTTP or DNS Challenge" providerName=myresolver.acme rule="(Host(localhost) && PathPrefix(/jellyfin))" routerName=jellyfin@docker ACME CA="https://acme-v02.api.letsencrypt.org/directory" time="2023-05-13T22:05:01Z" level=error msg="Unable to obtain ACME certificate for domains \"localhost\": cannot get ACME client ACME challenge not specified, please select TLS or HTTP or DNS Challenge" ACME CA="https://acme-v02.api.letsencrypt.org/directory" routerName=prowlarr@docker rule="(Host(localhost) && PathPrefix(/prowlarr))" providerName=myresolver.acme """

AdrienPoupa commented 1 year ago

Hello, it looks like Traefik is trying to get SSL certificates from Let's Encrypt, but your hostname is localhost, so obviously that fails. I assume you also did not fill your CloudFlare credentials to pass the DNS01 challenge.

You may want to setup a domain name to make it run, or disable certificate generation if you wish to proceed without a domain; this will disable the DNS challenge and switch the challenge server to staging:

DNS_CHALLENGE=false
LETS_ENCRYPT_CA_SERVER=https://acme-staging-v02.api.letsencrypt.org/directory

I would highly recommend using a domain name and setting up Let's Encrypt though.