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
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.
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
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 apps
Caddy
Container-heavy setup with changing routes
Traefik
Caching proxy for your origin
Apache Traffic Server
A self-hosted WAF
BunkerWeb or Coraza
Running your own DNS
CoreDNS or PowerDNS
Exposing a home or private service
frp 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.