Cloudflare

Best Self-hosted Alternatives to Cloudflare

A curated collection of the 10 best self hosted alternatives to Cloudflare.

Cloudflare is a global cloud platform offering CDN, reverse proxy, authoritative DNS, DDoS protection, web application firewall, load balancing and edge compute services to enhance performance, availability, and security for websites, APIs and applications.

Alternatives List

#1
SafeLine

SafeLine

SafeLine is a self-hosted Web Application Firewall (WAF) and reverse proxy that defends web apps from SQL injection, XSS, bot abuse, and DDoS using ML-powered threat detection and configurable policies.

SafeLine screenshot

SafeLine is a self-hosted Web Application Firewall (WAF) that sits in front of web apps to filter and monitor HTTP/S traffic, protecting against common web attacks. It also functions as a reverse proxy with ML-powered threat detection and modular, policy-driven protection.

Key Features

  • Intelligent protection engine powered by machine learning with high detection rates and very low false positives
  • Bot protection with CAPTCHA challenges and anti-replay protection
  • HTTP Flood DDoS protection through intelligent traffic orchestration and rate limiting
  • Identity and Access Management for on-prem and cloud apps via standard protocols and flexible integration
  • Nginx-based reverse proxy architecture that shields web apps from the Internet

Use Cases

  • E-commerce & Payment Platforms: protects merchant sites with real-time bot detection and traffic analysis, aiming to maintain availability during peak periods
  • SaaS & Cloud Platforms: protects REST and GraphQL APIs from common web threats with ML-powered anomaly detection
  • Content & Media Services: guards against high-frequency attacks and content scraping, with geo-based access controls for copyright compliance

Conclusion

SafeLine is a production-ready, self-hosted WAF with a broad user base and open community. It provides enterprise-grade protection for web applications, APIs, and services through ML-powered threat detection and flexible deployment options.

20.8kstars
1.3kforks
#2
Anubis

Anubis

Anubis is a lightweight web AI firewall that protects sites from AI crawlers and scraping bots using configurable request challenges and bot policies.

Anubis screenshot

Anubis is a lightweight web AI firewall utility that protects upstream websites from high-volume scraper bots, especially AI crawlers. It sits in front of your origin and uses one or more challenges to decide whether to allow a request through.

Key Features

  • Challenge-based request gating to deter automated scraping and crawler traffic
  • Designed to be lightweight and affordable to run in front of community sites and small services
  • Configurable bot policies for allowlisting or blocking specific clients (including “good bots”)
  • Acts as a standalone alternative for environments where a hosted reverse-proxy security service is not desired

Use Cases

  • Protecting personal sites, forums, and small communities from aggressive AI crawler traffic
  • Adding an anti-scraping layer in front of an origin server to reduce load and bandwidth costs
  • Enforcing access rules for known bots and automated clients via explicit allow/deny policies

Limitations and Considerations

  • Can be a disruptive (“nuclear”) approach that may block smaller scrapers and potentially useful crawlers unless explicitly allowlisted

Anubis is best suited for operators who need a self-managed, challenge-based front door for HTTP traffic and want fine control over which automated clients are permitted. When tuned with sensible policies, it can help balance discoverability with uptime protection.

17.2kstars
506forks
#3
CrowdSec

CrowdSec

CrowdSec is an open-source security engine that detects attacks from logs and blocks malicious IPs using bouncers and community-curated threat intelligence.

CrowdSec screenshot

CrowdSec is an open-source, community-driven security engine that detects malicious behavior by analyzing logs and HTTP requests. It combines local detection with shared threat intelligence so you can block attackers across your stack.

Key Features

  • IDS/IPS-style detection based on behavior analysis from log sources
  • Optional WAF-style application security for analyzing HTTP requests
  • “Detect here, remedy there” architecture with pluggable remediation components (bouncers)
  • Community blocklist of malicious IPs built from real-world signals contributed by users
  • Extensible detection scenarios and parsers available via a shared hub
  • Broad platform support, including common Linux deployments and containerized setups

Use Cases

  • Block brute-force attempts, scanning, and abusive automation at the host or edge
  • Reduce security alert noise by preemptively blocking known malicious IPs
  • Centralize detection from multiple services while enforcing remediation on firewalls, proxies, or applications

Limitations and Considerations

  • Effectiveness depends on correct log ingestion/parsing and properly tuned scenarios to avoid missed detections
  • Remediation requires deploying and maintaining compatible bouncers for your chosen enforcement points

CrowdSec fits teams that want practical intrusion detection and automated blocking without replacing their existing infrastructure. Its value increases with community participation by continuously improving shared attacker intelligence.

12.6kstars
576forks
#4
BunkerWeb

BunkerWeb

BunkerWeb is an open-source WAF and NGINX-based reverse proxy to protect web apps and APIs with HTTPS automation, security policies, and extensible plugins.

BunkerWeb screenshot

BunkerWeb is a next-generation, open-source web application firewall (WAF) that runs as an NGINX-based reverse proxy in front of your web services. It aims to provide secure-by-default protection for websites, applications, and APIs while staying easy to integrate into common deployment environments.

Key Features

  • Reverse proxy web server built on NGINX for fronting multiple web services
  • Built-in web security hardening (TLS configuration, HTTP security headers)
  • Automated HTTPS certificate management with ACME/Let’s Encrypt
  • Integrated ModSecurity WAF with OWASP Core Rule Set support
  • Rate limiting and request/connection limiting to reduce abuse
  • Automatic banning based on suspicious behavior and HTTP status patterns
  • Bot protection with challenge mechanisms (for example JavaScript, cookie, CAPTCHA)
  • IP reputation blocking via external lists and DNSBL
  • Extensible plugin system for adding or customizing security capabilities
  • Optional web UI for managing instances and configuration

Use Cases

  • Protecting self-hosted websites and web apps behind a hardened reverse proxy
  • Shielding APIs from common web attacks, abusive clients, and automated bots
  • Standardizing HTTPS/TLS and baseline security policies across environments

Limitations and Considerations

  • Some advanced capabilities are reserved for the commercial PRO offering
  • As with any WAF, effective protection requires careful tuning to minimize false positives

BunkerWeb is a strong fit when you want an auditable, configurable WAF that can be deployed across Linux, containers, and Kubernetes. Its secure-by-default approach, NGINX foundation, and plugin model make it suitable for both homelabs and production environments.

10.1kstars
566forks
#5
HAProxy

HAProxy

HAProxy is a fast, reliable reverse proxy and load balancer for TCP and HTTP applications, providing high availability, TLS termination, health checks, and traffic routing.

HAProxy screenshot

HAProxy is a high-performance reverse proxy and load balancer designed to improve availability and scalability of TCP and HTTP-based services. It is widely used as an edge proxy to route traffic, terminate TLS, and enforce traffic policies for web applications and APIs.

Key Features

  • Layer 4 (TCP) and Layer 7 (HTTP) proxying with flexible routing rules
  • Load balancing algorithms and active health checks for backend pools
  • TLS termination and modern HTTPS features (including HTTP/2 support)
  • High availability options, including multi-process support and state synchronization features
  • Rich observability via detailed logs, statistics, and runtime control interfaces
  • Extensibility via Lua scripting and advanced traffic processing mechanisms

Use Cases

  • Reverse proxy in front of web apps and microservices with TLS termination
  • High-availability load balancer for clustered services and databases exposing TCP
  • Traffic shaping, access control, and DDoS resilience at the edge

Limitations and Considerations

  • Configuration is powerful but can be complex for advanced Layer 7 routing policies
  • Some advanced features are version-dependent; production setups typically follow stable branches

HAProxy is a proven choice for performance-critical traffic management, combining efficient proxying with mature load-balancing capabilities. It fits well as a core component in both homelab and enterprise edge architectures where reliability and control are priorities.

6.4kstars
904forks
#6
Zoraxy

Zoraxy

A general-purpose HTTP reverse proxy and forwarding tool for homelabs, offering web UI, ACME/TLS, stream proxy, plugins and realtime monitoring.

Zoraxy screenshot

Zoraxy is a general-purpose HTTP reverse-proxy and forwarding gateway designed for homelab and self-hosted services. It provides a web UI for configuring proxies, TLS, routing and runtime utilities so users can expose and manage services from a single gateway.

Key Features

  • HTTP reverse proxy supporting virtual directories, alias hostnames and custom headers.
  • Automatic WebSocket proxying and stream proxy support for TCP/UDP forwarding.
  • TLS/SSL management with ACME (Let's Encrypt) support, auto-renew and SNI/SAN certificate handling; includes DNS challenge integrations.
  • Load balancing, basic auth, redirection rules and blacklist/whitelist controls (IP/CIDR/country).
  • Real-time analytics and uptime monitoring with instant network/visitor statistics and no-reload access control.
  • Plugin system and built-in utilities (mDNS scanner, Wake-on-LAN, IP/port scanners, debug forward proxy).
  • Web-based SSH terminal for in-browser administration.

Use Cases

  • Expose and route multiple self-hosted web apps (home server, NAS, media servers) behind a single, manageable reverse proxy.
  • Provide TLS/ACME certificate automation and DNS-challenge workflows for services without manual cert management.
  • Monitor service availability and traffic in real time, and run network utilities (scans, WOL) from the gateway UI.

Limitations and Considerations

  • Some advanced modules are community-maintained or seeking maintainers (notably ACME integration improvements and an extended logging/analysis module), which may affect feature completeness for large-scale deployments.

Zoraxy is lightweight and targeted at homelab users and small deployments that need a single gateway for routing, TLS and basic observability. It is distributed with prebuilt binaries and Docker artifacts and can be built from source with Go, making it suitable for ARM/SBC and x86 environments.

5kstars
277forks
#7
ddclient

ddclient

ddclient is a Perl-based Dynamic DNS client that detects IP changes and updates DNS records across many supported DDNS and DNS provider APIs.

ddclient screenshot

ddclient is a Perl client that keeps DNS records up to date when your public IP address changes. It supports a wide range of Dynamic DNS services and DNS provider APIs, and can run periodically or as a daemon to continuously refresh records.

Key Features

  • Updates dynamic DNS entries for many DDNS services and DNS providers
  • Multiple ways to detect external IP (web services or router status pages)
  • Daemon mode for periodic checks, or integration with cron, PPP, and DHCP hooks
  • Uses curl for network access (recommended and default in newer versions)
  • Configuration via ddclient.conf with optional command-line overrides
  • Supports environment-variable substitution in config for secrets (login/password)

Use Cases

  • Keep a home server reachable via a domain name on a changing residential IP
  • Automatically update DNS records for self-hosted services behind consumer ISPs
  • Maintain IPv4/IPv6 address records for labs, small offices, or remote sites

Reliable and widely packaged across Unix-like systems, ddclient is a practical choice when you need automated DNS updates without running a full DNS stack. Its broad provider support and flexible IP detection make it suitable for many network environments.

3.3kstars
380forks
#8
UUSEC WAF

UUSEC WAF

High-performance web application firewall and API security gateway with semantic detection, rule management, and reverse-proxy deployment for protecting websites and APIs.

UUSEC WAF screenshot

UUSEC WAF is a web application firewall (WAF) and WAAP-style API security gateway designed to protect websites and HTTP APIs by running as a reverse proxy in front of upstream services. It combines semantic detection engines with a flexible rule system and a management UI for configuring sites, certificates, and protections.

Key Features

  • Reverse-proxy protection for websites and APIs (traffic-layer defense)
  • Semantic detection engines targeting common web attacks (including SQLi and XSS)
  • Deep decoding of request content to reduce bypass techniques
  • Rule engine with immediate effect after publishing, without restarting services
  • Management console for adding protected sites and configuring policies
  • TLS certificate management, including automated issuance/renewal via Let’s Encrypt
  • Extensible advanced rules via Lua scripting for custom protections

Use Cases

  • Protect internet-facing web applications from common OWASP-style attacks
  • Front multiple backend services with a single security and TLS termination layer
  • Add centrally managed security rules for legacy apps without code changes

Limitations and Considerations

  • Typically requires control of ports 80/443 on the host due to reverse-proxy deployment
  • Best suited to Linux x86_64 environments per project guidance

UUSEC WAF fits teams that want a self-managed WAF/WAAP layer with a UI, certificate automation, and flexible rule authoring. It is especially useful when you need protective controls without modifying application code.

1.6kstars
159forks
#9
NetGoat

NetGoat

NetGoat is a self-hostable reverse proxy and traffic management platform offering Cloudflare-like features such as TLS termination, rate limiting, WAF-style filtering, and dashboards.

NetGoat screenshot

NetGoat is a self-hostable reverse proxy engine and traffic manager designed to provide Cloudflare-like controls for routing, security, and performance. It aims to help homelabs and teams manage inbound web traffic with an integrated UI and rule-based behavior.

Key Features

  • Reverse proxy for HTTP traffic, including WebSocket support
  • TLS termination with automated certificate handling
  • WAF-style request filtering and anti-abuse protections
  • Rate limiting and request queuing to protect APIs and apps
  • Load balancing and failover for multi-node routing
  • Per-domain configuration with wildcard/regex support
  • Dynamic rules engine for custom routing and filtering logic
  • Metrics dashboard for traffic and error visibility
  • Optional integration targeting Cloudflare workflows (such as tunnels)

Use Cases

  • Fronting multiple self-hosted services with a single security and routing layer
  • Adding rate limiting and basic WAF protections to APIs and web apps
  • Managing multi-service homelab ingress with per-domain policies and monitoring

Limitations and Considerations

  • Project is explicitly work-in-progress; features and stability may change significantly
  • Some advertised capabilities may be incomplete depending on the current release state

NetGoat is best suited for users who want a centralized, UI-driven reverse proxy with security-focused controls and extensibility. As it matures, it can serve as a flexible edge layer for both homelab and small-team deployments.

692stars
27forks
#10
Squid

Squid

Squid is a high-performance caching proxy that accelerates web delivery, reduces bandwidth usage, and provides extensive access controls for proxy and reverse-proxy setups.

Squid screenshot

Squid is a widely used caching proxy server that optimizes web traffic by storing and reusing frequently requested content. It supports multiple protocols and is commonly deployed both as a forward proxy for users and as a reverse proxy (server accelerator) in front of web services.

Key Features

  • Caching proxy for web traffic to reduce bandwidth usage and improve response times
  • Supports HTTP and HTTPS proxying, plus FTP and additional protocols
  • Extensive access controls for controlling and filtering client access
  • Can act as a server accelerator (reverse proxy) to reduce origin load
  • Flexible request routing to build cache hierarchies and content clusters
  • SSL/TLS features for HTTPS handling (including interception modes in supported setups)

Use Cases

  • ISP and enterprise forward proxy to optimize outbound web access and control usage
  • Reverse proxy cache to accelerate websites and APIs and reduce backend load
  • Hierarchical caching deployments to improve throughput across multiple networks

Limitations and Considerations

  • HTTPS interception/"bumping" requires careful certificate management and has significant privacy and compliance implications
  • Configuration is powerful but can be complex for advanced routing and policy setups

Squid is a mature and performance-focused proxy cache with strong policy controls and deployment flexibility. It is best suited for environments that need bandwidth savings, improved latency, and fine-grained traffic control at the proxy layer.

Why choose an open source alternative?

  • Data ownership: Keep your data on your own servers
  • No vendor lock-in: Freedom to switch or modify at any time
  • Cost savings: Reduce or eliminate subscription fees
  • Transparency: Audit the code and know exactly what's running