touhidurrr/hardened-caddy-cloudflare

By touhidurrr

Updated about 2 hours ago

Docker Hardened Caddy + Caddy Cloudflare Plugin

Image
Security
Integration & delivery
Web servers
0

10K+

touhidurrr/hardened-caddy-cloudflare repository overview

Hardened Caddy Cloudflare

Docker Hardened Caddy Image with Caddy Cloudflare Module

Usage

docker pull touhidurrr/hardened-caddy-cloudflare

Then follow this guide: https://hub.docker.com/hardened-images/catalog/dhi/caddy/guides

Important Notes

The documentation in DHI Guide is mostly fine, but a couple of things needs to be fixed for better persistance.

Directories:

Config: /home/nonroot/.config/caddy

Data: /home/nonroot/.local/share/caddy

This compose.yml works:

services:
  caddy:
    image: touhidurrr/hardened-caddy-cloudflare
    container_name: hardened-caddy-cloudflare
    restart: always
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
      - ./caddy/data:/home/nonroot/.local/share/caddy
      - ./caddy/config:/home/nonroot/.config/caddy
      # (Optional) in case you are using Unix domain sockets like me
      - ./sockets:/sockets
    environment:
      CF_API_TOKEN: <Your API Token>

Tag summary

Content type

Image

Digest

sha256:7227b6d77

Size

33.7 MB

Last updated

about 2 hours ago

docker pull touhidurrr/hardened-caddy-cloudflare:2.11.4