Skip to content
The Chat Archive
deepseek-r1-0528· DeepSeek LMArena Human Preference 140K

I want to expose some of my self-hosted to the Internet, as I want my family to be able…

  1. User

    I want to expose some of my self-hosted to the Internet, as I want my family to be able to use them. I read that Cloudflare offer a lot of security solution, like WAF, DynDNS, ... But I built my homelab with a strong emphasis on sovereignty, open-source and privacy.

    What is the best compromise?

  2. Assistant

    To balance your sovereignty, open-source, and privacy goals while securely exposing self-hosted services, here's a privacy-first compromise using Cloudflare selectively and open-source tools for critical components:


    Recommended Architecture

    1. Cloudflare for DNS & DDNS Only (No Proxy)

      • Use Case: Dynamic DNS (DDNS) and DNS management.
      • Privacy Setup:
        • Disable Cloudflare's proxy (set DNS records to "DNS-only" 🟦 grey cloud). Traffic never touches Cloudflare's servers.
        • Use Cloudflare's DDNS updater (open-source) to keep your home IP updated.
      • Why?: Reliable DDNS without routing traffic through Cloudflare.
    2. Self-Hosted Reverse Proxy + WAF

      • Tool: Traefik or Nginx Proxy Manager (open-source).
      • Key Features:
        • Terminate TLS (with Let's Encrypt).
        • Route traffic to internal services (e.g., Nextcloud, Jellyfin).
        • Add open-source WAF rules (e.g., ModSecurity for Nginx).
      • Why?: Full control over traffic filtering without third parties.
    3. Firewall & Network Hardening

      • Router/Firewall: Use OPNsense (open-source) to:
        • Allow only ports 80/443 → reverse proxy.
        • Block all other ports/IPs.
        • Enable GeoIP blocking (e.g., allow only your country).
      • Fail2ban: Deploy on the reverse proxy to block brute-force attacks.
    4. VPN for Admin/Private Services

      • Tool: Tailscale (open-source core) or WireGuard.
      • Use Case: Access admin dashboards (e.g., Portainer, Proxmox) via VPN only. Never expose these publicly.
      • Why?: Zero-trust access without port-forwarding.
    5. Privacy-Preserving Cloudflare Alternatives

      • DDNS: ddclient with deSEC.io (open-source DNS).
      • WAF: Coraza (open-source WAF engine) integrated into Traefik/Nginx.
      • CDN/DDoS Protection: Skip entirely (home bandwidth may be vulnerable to DDoS). If essential, use bunkerized-nginx (hardened Docker image).

    Step-by-Step Privacy Checklist

    ComponentSolutionPrivacy/Sovereignty
    DNS ManagementCloudflare (DNS-only)Traffic not proxied → no Cloudflare logging.
    DDNS Updatescloudflare-ddns (OSS)Updates IP via API; no traffic routing.
    Reverse ProxyTraefik / Nginx Proxy ManagerSelf-hosted; full control.
    WAF RulesModSecurity/Coraza (OSS)Open-source; no third-party scanning.
    FirewallOPNsense (OSS)Blocks threats at edge; GeoIP filtering.
    Admin AccessTailscale/WireGuard (OSS)E2E encrypted; no exposure to internet.
    TLS CertificatesLet's EncryptFree; automatic renewal.

    Why Avoid Cloudflare Proxy?

    • Traffic Inspection: Proxied traffic (🟧 orange cloud) allows Cloudflare to inspect payloads (e.g., file uploads).
    • Logging: Cloudflare retains request logs for 30+ days (source).
    • Sovereignty: You lose end-to-end control between client and server.

    Final Recommendation

    • For Family Services (e.g., Nextcloud, Media Server):
      Expose via self-hosted reverse proxy (Traefik/NPM) + WAF → strict firewall rules.
    • For Admin/Private Services:
      Only via Tailscale/WireGuard (never exposed).
    • Replace Cloudflare Proxy with:
      • deSEC.io (DNS) + ddclient (DDNS) if you reject Cloudflare entirely.
      • bunkerized-nginx for DDoS-aware hardening.

    This setup maintains sovereignty (all critical components open-source/self-hosted) and privacy (no third-party traffic interception), while leveraging Cloudflare minimally for DDNS reliability.

    💡 Note: If your ISP blocks ports 80/443, use a non-standard port (e.g., 8443) or a VPS tunnel (e.g., Cloudflared Tunnel in DNS-only mode).

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.