-
-
Notifications
You must be signed in to change notification settings - Fork 54
Certificates and domain matching
-
autocert DOES NOT register certificate for each route. Instead, it registers for all
autocert.domains
in yourconfig.yml
into a single certificate. All HTTP(s) requests to GoDoxy will be handled by the same certificate. -
autocert uses https://github.com/go-acme/lego, just like Traefik and similar go written reverse proxies. It grabs a cert using ACME and Let's Encrypt by DNS-01 challenge.
-
autocert obtain / renew certificates automatically, with 1 hour cooldown for every failed requests. It only renew when these conditions are met:
- autocert is enabled but no certs are found under
certs/
-
autocert.domains
does not match current certs - certs are about to expire in a month
- autocert is enabled but no certs are found under
(Docker only) By default, proxy.aliases
is set to container_name
.
Given that no match_domains
is set in config.yml
.
A route with short alias app
can be accessed at:
app.*
app.*.*
- etc.
A route with FQDN alias app.example.com
can be accessed at:
app.example.com
app.example.com.*
Given that you have set match_domains
in config.yml
to these:
match_domains:
- example.com
- example.app
A route with short alias app
can only be accessed at:
app.example.com
app.example.app
A route with FQDN alias app.example.com
can be accessed at:
app.example.com
-
app.example.com.example.com
(rare case) -
app.example.com.example.app
(rare case)
Given your main domain is my.app
- Add
my.app
toautocert.domains
andmatch_domains
inconfig.yml
autocert: domains: - my.app match_domains: - my.app
- When you want your app to connect thru
*.my.app
, use short aliases likeadguard
,sonarr
, etc.services: adguard: ... labels: proxy.aliases: adguard sonarr: ... labels: proxy.aliases: sonarr
- When you want your app to only connect thru other domains (i.e.
*.other.app
) but not*.my.app
- use FQDN aliases, e.g.
adguard.other.app
,sonarr.other.app
- add
*.other.app
toautocert.domains
# docker compose services: adguard: ... labels: proxy.aliases: adguard.other.app sonarr: ... labels: proxy.aliases: sonarr.other.app # config.yml autocert: domains: - my.app - other.app # add here
- use FQDN aliases, e.g.