le). This requires your instance to be reachable from the internet on ports 80/443.
In many enterprise environments this is undesirable or impossible. Instead of Let’s Encrypt, you can provide Traefik with your own certificate — for example a wildcard certificate, a certificate from your internal CA, or a commercially purchased certificate.
This page covers the certificate Traefik uses to secure incoming HTTPS connections from users. If VARIOS AI needs to reach outbound services that use self-signed certificates, you need a CA bundle inside the container instead — see Custom TLS Certificates.
Prerequisites
1
Certificate and private key in PEM format
Traefik needs two files: the certificate chain (
.crt/.pem) and the private key (.key). Both must be in PEM format (a text file starting with -----BEGIN CERTIFICATE----- or -----BEGIN PRIVATE KEY-----).2
Complete certificate chain
The certificate file must contain the server certificate and all intermediate certificates — the server certificate first, followed by the intermediates. Without the chain, browsers and API clients report a certificate error.
3
Unencrypted private key
Traefik cannot unlock passphrase-protected keys. The key must be stored without a passphrase.
4
Matching common name or SAN
The certificate must be issued for the domain configured as
PROJECT_DOMAIN in your .env (or list it as a Subject Alternative Name).How Traefik obtains certificates
Traefik knows two ways to obtain a certificate for a router:
The
docker-compose.yml shipped for on-premise installations is already prepared for both. The Traefik service starts with the file provider enabled and mounts the required directories:
docker-compose.yml
Setup
1
Place the certificate files
Put the certificate and key into the Protect the private key from unauthorized access:
traefik/certs directory next to your docker-compose.yml:2
Create the dynamic configuration
Create the file
traefik/dynamic/certificates.yml. Traefik picks it up automatically through the file provider — the paths refer to the paths inside the container (/etc/traefik/certs), not to host paths.traefik/dynamic/certificates.yml
The
certificates section makes the certificate available for matching hostnames. stores.default.defaultCertificate additionally sets it as the default certificate — that way Traefik also answers requests without a matching hostname with your certificate instead of the generated placeholder TRAEFIK DEFAULT CERT.3
Disable Let's Encrypt on the router
In Optionally, you can also remove the ACME options from the Traefik service’s
docker-compose.yml, remove the certificate resolver label from the php service. Keep the tls=true label — only the automatic issuance goes away:docker-compose.yml
command block (--certificatesresolvers.le.*) if Let’s Encrypt is no longer used at all.4
Apply the changes
docker compose up -d handles that automatically. Changes to files below traefik/dynamic and traefik/certs, on the other hand, are picked up without a restart thanks to --providers.file.watch=true.Verification
After startup, check which certificate Traefik serves:The output must show the issuer and validity of your certificate. If
TRAEFIK DEFAULT CERT appears instead, the dynamic configuration was not loaded.Renewing the certificate
To replace an expiring certificate, simply swap the two files:--providers.file.watch=true, Traefik usually detects the change automatically. If the old certificate is still served, force a reload:
Multiple domains
If VARIOS AI should be reachable under several hostnames, add more entries undercertificates. Traefik selects the matching certificate based on the hostname sent via SNI:
traefik/dynamic/certificates.yml
docker-compose.yml
*.example.com) needs no special handling — it is configured like any other certificate and applies to all matching hostnames.
Hardening TLS options
The file provider also lets you define the permitted TLS versions and cipher suites. Add another file in the same directory:traefik/dynamic/options.yml
The
default option automatically applies to every router that has no TLS option of its own. sniStrict: true rejects connections without a matching hostname — verify beforehand that all clients and monitoring systems use SNI. The cipher suite list only affects TLS 1.2; the TLS 1.3 suites are fixed.