I want to expose some of my self-hosted to the Internet, as I want my family to be able…
- 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?
- 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
-
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.
-
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.
-
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.
- Router/Firewall: Use OPNsense (open-source) to:
-
VPN for Admin/Private Services
-
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
Component Solution Privacy/Sovereignty DNS Management Cloudflare (DNS-only) Traffic not proxied → no Cloudflare logging. DDNS Updates cloudflare-ddns(OSS)Updates IP via API; no traffic routing. Reverse Proxy Traefik / Nginx Proxy Manager Self-hosted; full control. WAF Rules ModSecurity/Coraza (OSS) Open-source; no third-party scanning. Firewall OPNsense (OSS) Blocks threats at edge; GeoIP filtering. Admin Access Tailscale/WireGuard (OSS) E2E encrypted; no exposure to internet. TLS Certificates Let's Encrypt Free; 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-nginxfor 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).
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.