Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!
Share
The Most LOVED Server On The Planet
Published about 2 months ago • 4 min read
The Most LOVED Server On The Planet
This issue is brought to you by:
Reliable DNS hosting & domain name management With DNSimple!
From a streamlined interface to single-click integrations, DNSimple delivers the tools you need to simplify your day. Developers and system admins love our single-click integrations and automation tools for domains, DNS, and more. Enterprise teams simplify management of the most complex domain environments through our NEW Domain Control Plane.
Caddy is sitting at nearly 70k GitHub stars for a reason: after 15 years of being told Nginx is the only "professional" choice, I spent 30 days trying to break Caddy just to see if the hype was real.
Many of us developers treat web servers like a pet: we feed it certificates, groom its config files, and stay up late when it gets sick. I lived that life. Back in August 2016, I woke up at 5 AM to my pager app screaming. Production was down, and my phone was melting with messages. The reason? A wildcard SSL certificate had expired. One. One manual, avoidable task paralyzed our entire infrastructure. If you've noticed why all Fox News articles comments not only were missing but slowed down their system as well that month... well, it was kinda my bad 🙀
Caddy, isn't a pet, it’s a service dog. Actually, a robot service dog (don't think about AI.don't think about AI)... It stays out of the way and handles the hard stuff like SSL without you ever asking.
The King has complicated rules
For a decade, the standard solution has been Nginx or if you're more "modern" -> Traefik. The latter, up until last month my go-to for anything, from side projects to K8s in production, is not to be disrespected, but it can take a page from this book... We’ve been taught that if you want "production grade," you need complex configurations and external tools like Certbot to hack together HTTPS. Most people solve their server needs by manually managing certificate renewals or paying for "enterprise" features that should be standard.
If you want to get Caddy running the right way, use Mise like I do, or your favorite package manager (their list is quite extensive even in my standards).
mise use -g caddy@latest
Once it's in, you can see the sheer breadth of what it handles: from reverse proxying to authority management, just by checking the help menu:
caddy
To start a server:
caddy run
If you have a Caddyfile and want to see how the server translates it into that complex JSON while adapting it in realtime:
caddy adapt
And to push changes without killing the process:
caddy reload
Why your infra is a high maintenance
I ran stress tests comparing Caddy to Traefik; over 30 different permutations.
I wasn't joking
Even with 4 gigs of RAM, Traefik kept eating memory like a cookie monster and spiking under load, while Caddy stayed relatively lean and stable. This was mostly noticeable on very little resources (which suggests Caddy is the better option when you're constrained), but also, when the system was extremely stressed.
The zero config server
It turns that you don't need horrendous config structures to run a multi-node, multi-endpoint reverse proxy.
# running a caddy server on port 8081 listening on all interfaces :8081 # reverse proxying
reverse_proxy <:fromport> <:toport>
Want a file server with a UI to browse your assets?
caddy file-server --listen :2015 --browse
But here is the trick that blew my mind: serving localhost on HTTPS (yes forreal). Usually, that's a manual certificate nightmare. With Caddy, you just put this in your Caddyfile:
localhost {file_server browse}
proof I'm not bullsh***ing!
Caddy will literally ask for your password, install a root cert, and boom 💥 localhost on HTTPS. No more insecure flags needed in dev.
If you’re using it as a proxy (which most of us are), it’s just one command:
reverse_proxy :2080 :9000
In a Caddyfile, it’s even cleaner:
:2080 {reverse_proxy localhost:9000}
You can even run multiple sites in one block without the Nginx-style clutter:
For the Kubernetes crowd, Caddy is already ahead. It doesn't have a flashy UI, but it ships with a metrics endpoint for Prometheus:
# yes, that's all it takes -> metrics
And if you need to extend it, like using my favorite DNS provider, DNSimple, to handle DNS challenges: you use xcaddy to build a custom binary with the modules baked in:
Is it the undisputed heavyweight king? Maybe not for a massive, thousand node Kubernetes cluster ingress just yet. But for everything else? local dev, side projects, and high-performance gateways --> it has officially dethroned Traefik as far as I'm concerned. It’s zero config, it’s faster, and it actually lets me sleep through the night.
I hope this was valuable! Thank you for reading.
Feel free to reply directly with any question or feedback.
This Tool Replaced 7 CLIs (and killed my opensource) This issue is brought to you by: Depot: Build faster. Waste less time. Accelerate your Docker image builds and GitHub Actions workflows. Easily integrate with your existing CI provider and dev workflows to save hours of build time. Get started for free -> I’ve been in the terminal for 12 years. I don’t get surprised often. Then I found Television, and I was wrong about it before I even opened it. The friction of endless pipes ||| There’s a...
My Opencode Workflow As A Senior Engineer This issue is brought to you by: Descope: Drag & Drop Your Auth Your engineers are building at warp speed, so why should auth be left behind? Descope provides no / low code workflows that decouple auth, access control, and user management from your app’s codebase so your teams can focus on the core product. Signup and Get Started Now Everyone's trying to replace themselves. I'm just trying to ship faster. 11 months ago, Dario Amodei said "AI would be...
This Nginx Fork Should Be Illegal This issue is brought to you by: Trigger.dev: The open source platform to build and deploy fully‑managed AI agents and workflows Trigger.dev is the platform for building AI workflows in TypeScript. Long-running tasks with retries, queues, observability, and elastic scaling. Start Building Now Look, we all love Nginx. I've used it for years. It’s the reliable, rock-solid engine that’s kept my infra running since the early days. But every once in a while, it’s...