Traefik can be configured to accept incoming HTTPS connections in order to terminate the SSL connections. It can be configured to use an ACME provider (like Let's Encrypt or Step-Ca) for automatic certificate generation. Or we can create our own CA and Traefik certificates and configure Traefik to use them.
Before you begin, make sure you have the following installed on your system:
- Docker
- Docker Compose
-
Navigate to the
traefik-own-ca
directory:cd traefik-own-ca
-
Generate a self-signed certificate and key preferably using mkcert or any other tool of your choice. You can also use the pre-generated certificate and key in the
certs
directory. -
Start the Traefik container:
docker-compose up -d
-
Navigate to the
traefik-step-ca
directory:cd traefik-step-ca
-
Follow the instructions in the subfolder
-
Start the Traefik container:
docker-compose up -d
You should now have a working Traefik setup for local development using either a self-signed certificate or the Step-Ca library for automatic certificate signing.