DEV Community

Traefik using owned SSL certificate

This guide details a Docker Compose configuration for Traefik using pre-existing SSL certificates. The configuration specifies ports 80 and 443 for HTTP and HTTPS, respectively. It utilizes Docker as a service provider, enabling the Traefik dashboard and setting the log level to INFO. ACME configuration is included but optional, requiring an email address and storage location. Crucially, paths to the certificate and private key files are defined. Labels configure Traefik's routing rules and enable TLS for the API router. The necessary folder structure includes a docker-compose.yml file and a certs directory containing the certificate and key. Starting Traefik is done via the `docker-compose up -d` command. This setup ensures Traefik uses the provided SSL certificates for secure connections. The guide provides a clear, practical approach to configuring Traefik with SSL.
favicon
dev.to
dev.to