Mixing wildcard certificate with on_demand feature

Thanks @francislavoie! For some reason I thought caddy had some “magic” for the wildcards certificats too (which is almost impossible since they need some kind of restrict access to the DNS records).

I’ve moved my DNS to route53 since I’m using AWS for everything and it worked!


For the record, my steps:

  1. Download the custom caddy build

You can get the url at the Download Caddy page

curl 'https://caddyserver.com/api/download?os=linux&arch=amd64&p=github.com%2Fcaddy-dns%2Froute53&idempotency=20494704131839' -o caddy

  1. Move the binary (ex to: /usr/bin/caddy) and update its permissions (ex: 755 +x);
  2. Check if its working caddy version;
  3. Check if it has the route53 dns module caddy list-modules | grep route53;
  4. Go to AWS console and create the user/group/policy with this permissions: GitHub - libdns/route53: AWS Route53 provider implementation for libdns (change the hostedzone/ZABCD1EFGHIL with your zone ID);
  5. Create the ~/.aws/credentials file with the generated credentials;
[default]
aws_access_key_id = your_access_key_id
aws_secret_access_key = your_secret_access_key
  1. Update your Caddyfile (or json) to use the route53 module:
*.domain.com {
  # ....
  tls {
   dns route53
 }
}
  1. Start/reload caddy
1 Like