OSI-licensed only · self-hostable

Open-Source Cloudflare Alternatives (2026)

Cloudflare bundles several jobs into one dashboard: a CDN and caching layer, a reverse proxy with a web application firewall, authoritative DNS, and tunnels that expose private services. No single open-source project does all of that, and none gives you Cloudflare's global network, but each job has a solid self-hosted option you can run on your own servers.

Every tool below is under an OSI-approved licence (Apache-2.0, MIT, AGPL-3.0 or GPL-2.0), checked against its repository. Be realistic about one thing: self-hosting replaces the software, not the anycast network, so DDoS absorption at Cloudflare's scale is not something these tools reproduce on a single VPS.

Licences checked against each repository on November 7, 2026.

What you're replacing

  • •CDN-style caching and reverse proxying in front of an origin
  • •A web application firewall with managed-style rules
  • •Authoritative and recursive DNS
  • •Tunnels that expose services behind NAT or a firewall

At a glance

ToolBest forLicenceRuns as
CaddySimple reverse proxy with automatic HTTPSApache-2.0Server
TraefikReverse proxy for containers and microservicesMITDocker
Apache Traffic ServerEdge caching proxy you operate yourselfApache-2.0Server
BunkerWebAll-in-one WAF in front of web appsAGPL-3.0Docker
CorazaWAF engine to embed in your own proxyApache-2.0Server
CoreDNSFlexible DNS server with pluginsApache-2.0Server
PowerDNSAuthoritative and recursive DNS at scaleGPL-2.0Server
frpExposing a local service behind NATApache-2.0Server
PangolinSelf-hosted tunnelled access built on WireGuardAGPL-3.0Docker

1. Caddy

Apache-2.0

Best for: Simple reverse proxy with automatic HTTPS

An extensible server platform that uses TLS by default. Works well as a reverse proxy in front of your apps with minimal configuration.

Strengths

  • + TLS by default
  • + Small, readable configuration
  • + Extensible through modules

Trade-offs

  • − Not a global CDN
  • − WAF needs a separate module or component

2. Traefik

MIT

Best for: Reverse proxy for containers and microservices

A modern HTTP reverse proxy and load balancer built to make deploying microservices easy. Fits Docker-based setups where routes change often.

Strengths

  • + Designed for dynamic container environments
  • + MIT licence
  • + Load balancing built in

Trade-offs

  • − Not a caching CDN
  • − Dashboard and config take learning

3. Apache Traffic Server

Apache-2.0

Best for: Edge caching proxy you operate yourself

A fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server, and the closest building block here to Cloudflare's caching role.

Strengths

  • + Purpose-built caching proxy
  • + Apache Software Foundation project
  • + Extensible via plugins

Trade-offs

  • − Heavier to configure than Caddy
  • − You supply the multi-region footprint

4. BunkerWeb

AGPL-3.0

Best for: All-in-one WAF in front of web apps

Describes itself as a next-generation, open-source Web Application Firewall. Sits in front of your services as a reverse proxy with security features enabled.

Strengths

  • + WAF delivered as a ready-to-run proxy
  • + Container-friendly deployment
  • + Covers the security side of Cloudflare

Trade-offs

  • − AGPL-3.0 obligations if you modify and offer it
  • − No CDN or DNS features

5. Coraza

Apache-2.0

Best for: WAF engine to embed in your own proxy

An open-source, high-performance Web Application Firewall library that can protect applications from within your existing server stack.

Strengths

  • + Embeddable engine, permissive licence
  • + Fits into proxies you already run
  • + Active repository

Trade-offs

  • − A library, not a turnkey product
  • − You assemble rules and integration yourself

6. CoreDNS

Apache-2.0

Best for: Flexible DNS server with plugins

A DNS server and forwarder written in Go that chains plugins, so you enable only the features you need.

Strengths

  • + Plugin-based design
  • + Single Go binary
  • + Apache-2.0 licence

Trade-offs

  • − Not a managed DNS service
  • − Anycast and DDoS resilience are on you

7. PowerDNS

GPL-2.0

Best for: Authoritative and recursive DNS at scale

The repository contains the PowerDNS Recursor, the Authoritative Server and dnsdist, a DNS load balancer.

Strengths

  • + Separate authoritative and recursive servers
  • + dnsdist for load balancing
  • + Long-running project

Trade-offs

  • − More components to operate
  • − GPL-2.0 copyleft

8. frp

Apache-2.0

Best for: Exposing a local service behind NAT

A fast reverse proxy that lets you expose a server behind a NAT or firewall to the internet, similar in purpose to Cloudflare Tunnel.

Strengths

  • + Simple client and server model
  • + Apache-2.0 licence
  • + Active repository

Trade-offs

  • − You need a public server to relay traffic
  • − No built-in WAF or caching

9. Pangolin

AGPL-3.0

Best for: Self-hosted tunnelled access built on WireGuard

An open-source SASE platform built on WireGuard. The Community Edition is AGPL-3; the repository is dual licensed with a separate Fossorial Commercial License for the Enterprise Edition.

Strengths

  • + WireGuard-based remote access
  • + Self-hostable
  • + Community Edition under AGPL-3

Trade-offs

  • − Enterprise edition is under a commercial licence
  • − Narrower scope than Cloudflare's suite

New open-source tools, weekly

One email a week with the open-source projects, launches and releases added to TechLogHub. Unsubscribe in one click.

Get the TechLogHub digest

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

How to choose

If you need…Start with
Automatic HTTPS reverse proxy for a few appsCaddy
Container-heavy setup with changing routesTraefik
Caching proxy for your originApache Traffic Server
A self-hosted WAFBunkerWeb or Coraza
Running your own DNSCoreDNS or PowerDNS
Exposing a home or private servicefrp or Pangolin

Open-source Cloudflare alternatives: FAQ

Quick answers to common questions

Is there an open-source version of Cloudflare?

There is no single one. Cloudflare is proprietary, and its services (CDN, WAF, DNS, tunnels) map to separate projects such as Traffic Server, BunkerWeb or Coraza, CoreDNS or PowerDNS, and frp.

Can I replace Cloudflare's CDN by self-hosting?

You can run a caching proxy such as Apache Traffic Server, but a single server does not give you a global edge network. For that you would need to deploy several servers in different regions yourself.

What replaces Cloudflare Tunnel?

frp and Pangolin both let you expose services that sit behind a NAT or firewall. frp is a reverse proxy; Pangolin is a WireGuard-based platform whose Community Edition is AGPL-3.

Is a self-hosted WAF as good as Cloudflare's?

BunkerWeb and Coraza are real WAFs you can run yourself, but you maintain rules and updates. They do not come with a managed threat-intelligence service.

Which licences should I watch for?

Most picks here are Apache-2.0 or MIT. BunkerWeb and Pangolin's Community Edition are AGPL-3.0, and PowerDNS is GPL-2.0, which matters mainly if you modify and redistribute the code.

Maintain an open-source Cloudflare alternative?

List it on TechLogHub and we'll review it for this page.

Submit a project