Tutor SSL config

Hello @joel.edwards,

Please share this question on the Tutor Discussion Board, so it is easier to find for others having the same problem.

For your question, I have just done this process this week. You can find an outline below.

  1. Create your own Cloudflare Docker image following this guide. https://caddy.community/t/how-to-guide-caddy-v2-cloudflare-dns-01-via-docker/8007
    You can also use the image shared in the guide if you are just testing.
  2. Adjust Tutor to use your custom Caddy image.
tutor config save --set "DOCKER_IMAGE_CADDY=docker.io/USERNAME/REPO:TAG"
  1. You need to adjust the Tutor Caddyfile to use the DNS challenge.
    3.1. If you are using Maple, you can create a plugin that uses the patch caddyfile-global to insert the TLS configuration mentioned in the guide. I have not done this, but you should be able to figure
    it out from the Caddyfile documentation.
    3.2. If you are using older versions, you will have to run tutor local quickstart, then manually change the Caddyfile. Mine looks like this for your reference. You can find the Caddyfile at this location: echo "$(tutor config printroot)/env/apps/caddy"
DOMAIN {
    tls EMAIL { 
        dns cloudflare API_TOKEN
    }
    reverse_proxy nginx:80 {
        header_up X-Forwarded-Port 443
    }
}
2 Likes