Erorr With Dockerization On Unraid

The ACME HTTP and ALPN challenges, which are used by ACME servers like Let’s Encrypt and ZeroSSL require that the server be publicly accessible to solve.

If you’re only serving your sites locally but still want publicly trusted certificates, you’ll need to use the DNS challenge instead, which requires Caddy to be built with the appropriate plugin.

You mentioned you use namecheap as your DNS provider; Caddy doesn’t have a caddy-dns plugin for namecheap yet, so you’ll need to use the lego-deprecated plugin, which provides a namecheap provider:

https://go-acme.github.io/lego/dns/namecheap/

Building Caddy with modules is quite easy with Docker, there’s a section that explains it here: Docker, see the “Adding custom Caddy modules” section.

The trouble though, is that you’re using Unraid, which sits as a layer on top of Docker, and as far as I know doesn’t support building images from a Dockerfile via its interface. This means you’ll need to build the image yourself, from a terminal on the Unraid machine. You’ll make a file called Dockerfile somewhere, then run:

docker build -t my-custom-caddy .

The . is important, it means “look for a Caddyfile in this directory”. After this, you’ll be able to use my-custom-caddy as your image name instead of caddy:alpine.