Skip to content
Arjen edited this page Feb 21, 2025 · 1 revision

You can enable on_demand_tls by adding the follwing labels:

labels:
    caddy_0: yourbasedomain.com
    caddy_0.reverse_proxy: '{{upstreams 8080}}'

    caddy.on_demand_tls:
    caddy.on_demand_tls.ask: http://yourinternalcontainername:8080/v1/tls-domain-check # Replace with a full domain if you don't have the service on the same docker network.

    caddy_1: https:// # Get all https:// requests (happens if caddy_0 match is false)
    caddy_1.tls_0.on_demand:
    caddy_1.reverse_proxy: http://yourinternalcontainername:3001 # Replace with a full domain if you don't have the service on the same docker network.
Clone this wiki locally