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 6 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.
Stop Using Elasticsearch. Use Postgres Instead This issue is brought to you by: Postgres for sensor and machine data Factories, wells, grids, and fleets run on live machine data. Tiger Data keeps it performant and scalable in one Postgres. Get started with Text Search on TigerData→ Do you still need Elasticsearch? I wanted to test that properly, so I put Postgres in Docker, loaded it with thousands of support tickets, and checked how far the same BM25 relevance search used by dedicated search...
Somehow, Atuin Just Got EVEN Better This issue is brought to you by: Give your AI agents memory Learn how Oracle Agent Memory handles persistent context with custom extraction, hybrid search, filtering, and more control over what your agents remember. Read the developer guide → There aren't many terminal utilities I'd take with me anywhere. But if I had to pick just one, Atuin may very well be it. I've been using it for a few years now, and somehow the magic turtle keeps getting better. It...
You’ve Never Seen a Shell Like Xonsh This issue is brought to you by: Redis Iris: Your agents should be getting smarter Unreliable agents fail in production. Redis Iris is a unified, real-time context engine that delivers fresh, relevant context so agents perform at scale. Try for FREE Tell me if this sounds familiar:You start with a quick shell script. Then one step gets annoying, so you call Python. Then Python needs to shell out again. Then you’re parsing strings, juggling quoting, and...