maddy
maddy copied to clipboard
unknown config block: local_tls
Describe the bug
Cannot run maddy with tls.loader.acme in config, getting "unknown config block: local_tls" error on start.
Steps to reproduce
- get latest code from git.
- in maddy.conf replace
tls file /etc/maddy/certs/$(hostname)/fullchain.pem /etc/maddy/certs/$(hostname)/privkey.pem
with
tls.loader.acme local_tls {
email [email protected]
agreed # indicate your agreement with Let's Encrypt ToS
challenge dns-01
}
tls &local_tls
this is taken from https://maddy.email/reference/tls-acme/
- start maddy
Log files
unknown config block: local_tls
Configuration file
see above in steps
Environment information
- maddy version: master
Also having this issue :( Is there a working example configuration someone is using with acme?
I was able to get it working with following config.
tls {
loader acme {
hostname $(hostname)
email [email protected]
agreed # indicate your agreement with Let's Encrypt ToS
challenge dns-01
dns digitalocean {
api_token "api-key"
}
}
}
Is this a global tls configuration? So no tls &local_tls
is required?
yes
Can confirm the example in the documentation gives unknown config block: local_tls
error but the snippet in https://github.com/foxcpp/maddy/issues/577#issuecomment-1544471940 works. I guess the fix would be to update the example in the documentation.
I used a similar example to the documentation, but called named it acme_tls
instead of local_tls
throughout the config file and it worked.