What
This is a docker image of caddy built with caddy-dns/cloudflare.
Why
You can use this for many things, I use it mostly to add TLS to my website without using untrusted certs.
How
It's very easy; generate an API key and fill in a few values!
- Generate an API key that allows TLS certs to be configured; Cloudflare has instructions.
- Fill in your API key in the
docker-compose.yml
file - Make a
./data
directory for persistence of generated certs - Change the domain to be published in the
Caddyfile
(e.g.example.my_domain.com
) - Change the email the
Caddyfile
; caddy uses this email for the ACME account managing the site's certificates; you should be able to set it to your Cloudflare email) - Set what site you want to proxy in the
Caddyfile
. The example given is proxyinglocalhost:8000
. docker-compose up
ordocker compose up
depending on what you have installed.