It seems that every 10 years, a new web server comes along that becomes popular. When I started with hosting my own infrastructure, Apache, first launched in 1994, was the cool kid on the block. 10 years later in 2004, nginx saw the first light and has since become very successful. These days, I use nginx in my self-hosted infrastructure to act as a reverse proxy for my containerized services. It works well and is relatively easy to set up with this project from Evert Ramos, but it seems to be a bit of a niche thing. So I was wondering if there is an alternative to it, as it’s always good to have a plan B.
I am well aware of Traefik, but that’s a bit of an overkill for my needs. I need something simple to set up and maintain because I only need it to do two main things:
- Serve as a reverse proxy for many Docker Compose based projects running on a single host.
- The reverse proxy needs to automatically retrieve and update Letsencrypt certificates.
Long story short, say hello to Caddy, which was first released in 2015. At first, I thought Caddy was ‘just’ a Dockerized reverse proxy, but that was a misconception. In its ‘native’ form, Caddy has nothing to do with Docker, it runs as a standalone webserver that is easy to configure and has Letsencrypt capabilities built in. However, with this Docker Compose project by Lucas Lorentz, Caddy becomes a super easy to configure and to deploy reverse proxy for Docker Compose services. So let’s have a look:
Continue reading Caddy as a Docker-Compose Reverse Proxy