I use Caddy as a reverse proxy for my containers (it runs itself in a container). Everything works fine.
I also run a MQTT broker - this is a bus to which one can connect and listen to topics or post to them (I just mention this so that it is clear it has nothing to do with caddy).
Until now I was using it in its equivalent of a HTTP connection - without certificates.
I now need to add certificates so that a HTTPS SPA can access its secure web sockets.
One of the magic in caddy (one of many :)) is the automatic LE use to retrieve certificates for HTTPS web sites.
Would there be a mechanism where I could retrieve the certfile, cafile and keyfile for something that is not a web site and store them somewhere so that they can be used by another program? (such as my MQTT broker in my case)