This repository configures Caddy as a reverse proxy for hollant.dashlab.in:443 with automatic HTTPS using Cloudflare DNS-01 challenge.
- Reverse proxy to
hollant.dashlab.in:443 - Automatic HTTPS certificate management via Let's Encrypt
- DNS-01 challenge using Cloudflare DNS
- HTTP/3 support (QUIC)
- Automatic HTTP to HTTPS redirect
- Docker and Docker Compose
- Cloudflare account with API token
- DNS records managed by Cloudflare for
hollant.dashlab.in
-
Clone this repository
-
Create a
.envfile from the example:cp .env.example .env
-
Edit
.envand add your Cloudflare API token:CLOUDFLARE_API_TOKEN=your_actual_token_hereTo create a Cloudflare API token:
- Go to Cloudflare Dashboard → My Profile → API Tokens
- Create a token with
Zone:DNS:Editpermissions for your domain - Copy the token to your
.envfile
-
Build and start the container:
docker compose up -d --build
-
Check logs:
docker compose logs -f
- Caddyfile: Contains the Caddy server configuration
- docker-compose.yml: Defines the Docker service and volumes
- Dockerfile: Builds Caddy with the Cloudflare DNS plugin
caddy_data: Stores certificates and other datacaddy_config: Stores Caddy's configuration cache
80: HTTP (automatically redirects to HTTPS)443/tcp: HTTPS443/udp: HTTP/3 (QUIC)
docker compose downTo remove volumes as well:
docker compose down -v