How are you utilizing Caddy's admin API?

I am a new user of Caddy, coming from Nginx. I was attracted by the automatic HTTPS and TLS certificate management, as well as the simplicity of the typical Caddyfile. One thing that has made the transition slightly more conceptually challenging than I initially expected is Caddy’s configuration model - that all configuration comes in via the REST API.

I want to see how people are utilizing the admin API to do things that would be complex with the “configuration comes from the process reading a file” model. I am struggling to come up with a reason I’d want to use it, and would like to have my mind expanded. I suspect my lack of imagination has much to do with my simple needs, so I’d love to hear from people using it in all kinds of contexts.

It’s typically for situations like “you have N amount of customers and each of them need a different server config that you need to generate for them, so you push a config update via the API”.

99% of users are served sufficiently with config files. If you can’t immediately think of a reason to use the API, then don’t :slight_smile:

4 Likes