maddy icon indicating copy to clipboard operation
maddy copied to clipboard

unknown config block: local_tls

Open stanislavprokopov opened this issue 1 year ago • 6 comments

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

stanislavprokopov avatar Apr 02 '23 11:04 stanislavprokopov

Also having this issue :( Is there a working example configuration someone is using with acme?

onny avatar May 11 '23 18:05 onny

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"
        }
    }
}

stanislavprokopov avatar May 11 '23 18:05 stanislavprokopov

Is this a global tls configuration? So no tls &local_tls is required?

onny avatar May 11 '23 18:05 onny

yes

stanislavprokopov avatar May 11 '23 18:05 stanislavprokopov

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.

cuu508 avatar May 23 '23 06:05 cuu508

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.

gareththered avatar Jun 09 '23 07:06 gareththered