Caddy

I wanted to go back and talk about Caddy some more. To prepare, I went to the Caddy documentation, so I’ll share the heading. “Welcome to Caddy. Caddy is a powerful, extensible platform to serve your sites, services, and apps, written in Go. If you’re new to Caddy, the way you serve the Web is about to change.”

So, let's start there. They are not lying. Having Apache pushed on me from the beginning of school, Caddy came as a pleasant surprise. All you have to do to see the truth is watch a tutorial about setting up a virtual private server with Apache HTTPS web server software and then watch a tutorial about setting up Caddy web server software. The number of things that Caddy does for you is really, really nice. The Caddy documentation at caddyserver.com/docs has a getting started tutorial that covers the basics of downloading and, as it says, getting started. It takes you through config files, APIs, JSON, and the Caddyfile, giving good comparison lists to show you what is easy and what is difficult, giving you the choice of direction.

Configuration files are optional with Caddy, but they run you through how to set one up first. The docs explain that Caddy’s configuration is a JSON document at its core and runs you through a “hello world” file. The docs then explain how a multi-line config file (19 lines if you include a string of closing brackets) can be done in two lines with a Caddyfile. That, right there, sums up the Caddy experience. If you let Caddy do what Caddy does, it is simplicity compared to other methods. Like magic.

There is a post on the internet that is titled “Caddy seems too good to be true? I just set it up.” Is it too good to be true? I’ve delved into some of the good and some of the bad. To begin with, a great thing about Caddy is that it was the first web server that used HTTPS by default. When you start your website, Caddy will automatically connect to Let’s Encrypt and configure your SSL certificate for you. Even better? It will automatically renew it as well.

Other benefits of Caddy include a plugin system that allows you to build on its functionality, giving you options for many use cases and allowing you options to scale. Built-in support for load balancing is a thing with Caddy. Reverse Proxy, serving Markdown files and HTTP/2 and QUIC support are all in Caddy’s lane. Additionally, it can be used on many different environments including Linux, Windows, MacOS, Cloud computing, Docker, Kubernetes, and even WordPress, Drupal, and Joomla.

So, what’s the downside? For one, it was released in 2015, so it’s a relatively newcomer. At the moment, it has a tiny sliver of the market share, so its community is also small compared to the big guys. A smaller community means fewer independent tutorials on the internet, less help on the boards, and just an overall much smaller presence. Another natural extension of a smaller community is a smaller library of extensible modules than Apache or Nginx. Being newer, and having a smaller slice, it just hasn’t proven itself and hasn’t built the trust that comes with seasoned pros like Apache and Nginx.

Posted on: 2024-07-04 02:58:14.230004

Back to Blog