Caddy and Ejabberd

1. Output of caddy version:

v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=

2. How I run Caddy:

I have a custom compiled version of Caddy that includes my ListenCaddy module

a. System environment:

Debian 11 Bullseye, no docker. Systemd is used

d. My complete Caddy config:

hatemach.in {
        root * /var/www/hatemachine
        file_server
        templates
        encode zstd gzip
}

3. The problem I’m having:

I am trying to use the ejabberd XMPP server, however, that requires Let’s Encrypt certificate files if I’m not mistaken. I need to know where caddy stores its certificates so ejabberd can use them (pem files)

4. Error messages and/or full log output:

5. What I already tried:

I haven’t tried anything, since I am just unsure on where caddy stores it’s .pem certificates.

6. Links to relevant resources:

https://docs.ejabberd.im/admin/configuration/

As per docs/conventions#data-directory, they are in ~/.local/share/caddy/certificates/.
On Debian, that would be /var/lib/caddy/.local/share/caddy/certificates/

In Caddy v2.6.0 a global eventing system has been added.
You could also use that, at least in theory, to execute *something*, whenever a certificate is obtained/renewed.
See docs/caddyfile/options#event-options

Note: If you don’t need STARTTLS in XMPP (can’t remember if that’s optional in XMPP), then I would highly recommend looking into GitHub - mholt/caddy-l4: Layer 4 (TCP/UDP) app for Caddy

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.