Caddy as a poor man’s serverless solution - would it make sense?

I’ve just stumbled upon Caddy recently. I was wondering if it would make sense and would be feasible to make Caddy execute Go functions to respond to requests. Basically to turn it into a “poor man’s” selfhosted serverless solution.


Yep! That’s totally viable.

The templates directive is sorta that, it runs template functions that are defined in some file (HTML usually).

You essentially just need to write a request handler that runs what you want to run. It would need to be compiled in with Caddy, of course.

We have docs that describe how to write plugins/modules:

Does that answer your question? If not, could you elaborate further what you’re looking to do exactly?


Yes, it answers my question. Thank you!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.