Hi Team,
I am trying to generate certificates using Traefik along with the Let's Encrypt DNS challenge, but the certificate section in my acme.json file is empty. Could you please help me with this?
-
I have checked the container logs and did not find any errors.
-
My Traefik container is running without any issues.
-
In the acme.json file, I can see the private key only and certificate is null.
-
I checked the logs and still do not see any errors.
docker-compose fie
services:
traefik:
image: traefik:v3.2
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- traefik
ports:
- 80:80
- 443:443
environment:
GANDI_API_KEY_FILE: ${GANDI_API_KEY}
TRAEFIK_DASHBOARD_CREDENTIALS: ${TRAEFIK_DASHBOARD_CREDENTIALS}
secrets:
- gandi_api_token
env_file: .env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./data/traefik.yml:/traefik.yml:ro
- ./data/acme.json:/acme.json
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http"
- "traefik.http.routers.traefik.rule=Host(`traefik-dashboard.example.com`)"
- "traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_DASHBOARD_CREDENTIALS}"
- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https"
- "traefik.http.routers.traefik.middlewares=traefik-https-redirect"
- "traefik.http.routers.traefik-secure.entrypoints=https"
- "traefik.http.routers.traefik-secure.rule=Host(`traefik-dashboard.example.com`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=gandi"
- "traefik.http.routers.traefik-secure.tls.domains[0].main=traefik-dashboard.example.com"
#- "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.int.example.com"
- "traefik.http.routers.traefik-secure.service=api@internal"
secrets:
gandi_api_token:
file: ./gandi_api_token.txt
networks:
traefik:
external: true
global:
checkNewVersion: false
sendAnonymousUsage: false
log:
level: DEBUG
filePath: "/var/log/traefik/traefik.log"
api:
dashboard: true
debug: true
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
scheme: https
https:
address: ":443"
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
certificatesResolvers:
gandi:
acme:
email: emailatsupport@.example.com
storage: acme.json
#caServer: https://acme-v02.api.letsencrypt.org/directory
caServer: https://acme-staging-v02.api.letsencrypt.org/directory
dnsChallenge:
provider: gandi
resolvers:
- "213.186.33.99:53"
- "213.186.33.100:53"
Thank you in advance for your support!