Every time you forward a port on your router, you crack open a door to the internet. Anyone scanning your IP can knock on it, and some will.
There is a better way.
Cloudflare Tunnel creates a secure, outbound-only connection between your local server and Cloudflare's edge network. No open ports. No static IP. No firewall rules. Your app becomes reachable at your custom domain, fully encrypted, completely free.
I recently migrated to a new domain and used this exact setup to get my Dockerized React + Django + Nginx stack live in under an hour. This guide walks you through every step.
By the end, your app will be live at your domain with zero exposed ports and zero cost.
Prerequisites
A Cloudflare account (free)
A domain added to Cloudflare (nameservers pointed to Cloudflare)
Your application running inside Docker
cloudflared service running in Docker
Basic terminal knowledge
Step 1: Add Your Domain to Cloudflare
Log in to Cloudflare and click Add domain
Enter your domain > select the Free plan >…