1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
a. System environment:
Ubuntu 20.04 / obtained from Caddy download site / systemd to manage service
b. Command:
not applicable / run via systemd at startup
c. Service/unit/compose file:
# caddy.service
#
# For using Caddy with a config file.
#
# Make sure the ExecStart and ExecReload commands are correct
# for your installation.
#
# See https://caddyserver.com/docs/install for instructions.
#
# WARNING: This service does not use the --resume flag, so if you
# use the API to make changes, they will be overwritten by the
# Caddyfile next time the service is restarted. If you intend to
# use Caddy's API to configure it, add the --resume flag to the
# `caddy run` command or use the caddy-api.service file instead.
[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.target
[Service]
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
d. My complete Caddyfile or JSON config:
reticulum.us www.reticulum.us broken.works {
reverse_proxy * 192.168.9.23:80
}
checkwithscience.com {
reverse_proxy * 192.168.9.40:80
}
directory.broken.works {
reverse_proxy * 192.168.9.24:80
}
git.reticulum.us {
reverse_proxy * 192.168.9.35:443 {
transport http {
tls_insecure_skip_verify
}
}
}
manage.broken.works {
reverse_proxy * 192.168.9.10:8006 {
transport http {
tls_insecure_skip_verify
}
}
}
cepheii.reticulum.us {
reverse_proxy * 192.168.9.22:8112
}
registry.broken.works {
reverse_proxy * 192.168.9.20:8080
}
bwarv.broken.works {
reverse_proxy * 192.168.9.80:443 {
transport http {
tls_insecure_skip_verify
}
}
}
keep.bwarv.broken.works {
reverse_proxy * 192.168.9.81:25107
}
download.bwarv.broken.works {
reverse_proxy * 192.168.9.81:9002
}
collections.bwarv.broken.works {
reverse_proxy * 192.168.9.81:9002
}
*.collections.bwarv.broken.works {
reverse_proxy * 192.168.9.81:9002
}
ood.broken.works {
reverse_proxy * 192.168.9.200:80
}
3. The problem I’m having:
I have been reading through the documentation and I simply cannot grok what we are supposed to do to get DNS-01 challenges working for wildcard certs with Letsencrypt. I have gotten so far as installing the custom build for Route53 and creating an IAM user with the appropriate policies for the hosted zone, but the “example” directive is missing information. The Github documentation shows you this to put into your Caddyfile:
tls {
dns route53 {
max_retries 10
aws_profile "real-profile"
}
}
But there is no indication as to
- Where in the Caddyfile this directive goes
- Where it is supposed to get an AWS profile from
I’m kind of theorizing that in my example Caddyfile it would be something like this, putting the “tls” directive at the same level as the “reverse_proxy” directive:
*.collections.bwarv.broken.works {
reverse_proxy * 192.168.9.81:9002
tls {
dns route53 {
max_retries 10
aws_profile "wildcard-user"
}
}
}
But even assuming that is true, I have no idea what to do next. How is it supposed to know what “wildcard-user” is? Why can’t I just specify a path to a file with the credentials in it?
Thanks in advance for any help.