Skip to main content
For on-premise installations, VARIOS AI is served through Traefik. By default, Traefik requests the TLS certificate for your domain automatically from Let’s Encrypt (certificate resolver 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).
Check format and validity up front:
Certificate and key belong together only if both checksums are identical:

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
So you do not need to modify the Traefik service. It is enough to place the certificate files, add a dynamic configuration, and disable the ACME resolver on the router.

Setup

1

Place the certificate files

Put the certificate and key into the traefik/certs directory next to your docker-compose.yml:
Protect the private key from unauthorized access:
Never store private keys in a directory served by a web server, and never commit them to version control.
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 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
If certresolver=le stays in place, Traefik keeps trying to issue a Let’s Encrypt certificate. In isolated networks this fails permanently and floods the log with ACME errors.
Optionally, you can also remove the ACME options from the Traefik service’s command block (--certificatesresolvers.le.*) if Let’s Encrypt is no longer used at all.
4

Apply the changes

The label change only takes effect once the container is recreated; 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.
Check the certificate chain with:
Traefik logs errors while loading the dynamic configuration to the container log:

Renewing the certificate

To replace an expiring certificate, simply swap the two files:
Thanks to --providers.file.watch=true, Traefik usually detects the change automatically. If the old certificate is still served, force a reload:
Set a reminder ahead of the expiry date. Unlike Let’s Encrypt, a manually provided certificate does not renew itself.

Multiple domains

If VARIOS AI should be reachable under several hostnames, add more entries under certificates. Traefik selects the matching certificate based on the hostname sent via SNI:
traefik/dynamic/certificates.yml
The additional hostnames must also appear in the router rule:
docker-compose.yml
A wildcard certificate (*.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.

Troubleshooting