Cloudflare Zero Trust Setup

Protect your self-hosted apps without opening ports.

Why Use Cloudflare Zero Trust?

Steps

  1. Go to dash.cloudflare.com and select your domain
  2. Navigate to "Zero Trust" → "Access" → "Applications"
  3. Create a new application:
    • App name: e.g., Sonarr
    • Domain: sonarr.yourdomain.com
    • Session duration: 1 week
  4. Set rules → Include emails (your email only, or use groups)
  5. Install the Cloudflare Tunnel connector on your server (Cloudflared)
  6. Connect it with:
    cloudflared tunnel login
    cloudflared tunnel create sonarr
  7. Set up routing: point subdomain to the tunnel
  8. Test access!