What is Caddy and How It Helped My Product DBLayer.dev


When building my first SaaS project, DBlayer.dev, I needed a reliable, secure, and !!hassle web server that could scale effortlessly. That’s when I discovered Caddy—a powerful and modern web server that truly stands out.
In this post, I’ll share what Caddy is, why I chose it, and how it solved my domain and subdomain management challenges.
What is Caddy?
Caddy is an open-source web server known for its automatic HTTPS, developer-friendly configuration, and modern architecture. Unlike traditional web servers like Nginx or Apache, Caddy is built with simplicity and security in mind—perfect for developers.
Key Features of Caddy
🔒 Automatic HTTPS – Caddy automatically issues and renews SSL certificates using Let's Encrypt.
⚡ Simple Configuration – Define your routes using a clean
Caddyfile
format—easy to read, easy to update.🧩 Extensible – Add plugins for reverse proxying, static file serving, rate limiting, and more.
📦 Single Binary – No external dependencies. Just download and run. It works on almost any platform.
(Feature list adapted from my experience and official documentation.)
Why I Picked Caddy for DBLayer.dev
1. Zero SSL Headache
DBLayer.dev supports custom subdomains like username.dblayer.dev
. Managing HTTPS manually for each subdomain would’ve been a nightmare. With Caddy, it was a non-issue—SSL was automatically provisioned and renewed without any manual steps.
2. Effortless Reverse Proxy
Caddy handles reverse proxying to my Go and Express.js backends with elegant simplicity. Here's how I route all subdomains to my app:
*.dblayer.dev {
reverse_proxy 127.0.0.1:3000
}
That’s it—no complicated config blocks, rewrites, or certificate handling.
3. Hot Reloads with Zero Downtime
Caddy supports seamless configuration reloads without downtime. Whether I update routing rules or change backend ports, Caddy applies changes instantly—perfect for continuous deployment workflows.
4. Lightweight and Reliable
Since DBLayer is a bootstrapped project, cost is a major concern. Caddy, being written in Go and packaged as a single binary, runs efficiently with minimal memory usage. I can deploy it on my server without any extra overhead.
My Domain Management Approach
DBLayer allows users to claim a custom subdomain (e.g.,
cake.dblayer.dev
) to give their endpoints a personal touch.Initially, I looked into traditional setups like Nginx + Let's Encrypt, but managing dynamic subdomains and certificates was complex and expensive.
As a solo founder of a bootstrapped project, I needed a smarter, cost-effective solution.
That’s when I found Caddy. I explored it, tested it, and it turned out to be what I needed—auto SSL, reverse proxying, dynamic subdomain support, and more.
Looking ahead, I also plan to support dynamic host mappings, and Caddy is flexible enough for those use cases too.
My Setup in Practice
I run a cron job that checks table for subdomains that haven’t yet been added.
If a new subdomain is found, the script checks if it exists in the
Caddyfile
. If not, it appends the new block and reloads Caddy.The best part? ~No downtime. Caddy handles updates fast and gracefully.
You can check out my actual Caddy config here:
👉 Caddyfile Gist
(Some parts are for upcoming features—stay tuned!)
Caddy has been a good product for DBLayer.dev. If you're building something similar with dynamic subdomains, SSL, and reverse proxying—Caddy is absolutely worth trying.
Checkout My Product: https://dblayer.dev/
Thank you
Subscribe to my newsletter
Read articles from Abhishek Pathak directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Abhishek Pathak
Abhishek Pathak
A Learner. Learning things which will exist,