This project uses Docker Compose and Cloudflare Tunnel to securely expose a local service to the internet. Caddy acts as a reverse proxy for the mendhak/docker-http-https-echo container and also serves static files.
-
Go to your Cloudflare dashboard: Zero Trust > Networks > Tunnels.
- Create a new tunnel.
-
Add a new Public hostname. Service must be
https://debug-caddy. -
Important: Use the following configuration settings:
Origin configurations: noTLSVerify: On httpHostHeader: subdomain.your-cool-url.com originServerName: subdomain.your-cool-url.com -
Add your Cloudflare token to a
.envfile in the project root. -
Update the
Caddyfilewithsubdomain.your-cool-url.com -
Start the services:
docker-compose up -d
-
Visit
https://subdomain.your-cool-url.comin your browser.
Check the terminal request information (user-agent, client IPs, etc.) as output by the echo server.