Open-source alternative to Cloudflare Tunnel

Cloudflare Tunnel publishes internal services through Cloudflare's network. OpenZiti, NetBird routing peers and Pomerium can replace it on your own infrastructure, each with different trade-offs in traffic path, protocol coverage and operating effort.

On this page

Which open-source option replaces Cloudflare Tunnel for internal services

If your team publishes internal services through cloudflared, the main self-hosted options are OpenZiti, NetBird routing peers and a Pomerium proxy, and the right one depends on two things: which protocols you need to publish and whether your traffic may pass through a vendor network at all. Pomerium fits web applications and fronts them with your identity provider, NetBird suits teams that want a WireGuard mesh with routes into private networks, and OpenZiti covers non-web protocols and service-to-service traffic with dark services that have no open ports. None of them is a drop-in copy of Tunnel's edge, so expect to rebuild the public entry points, DNS and certificates yourself.

The change that matters most is where traffic flows. With Tunnel, client requests reach Cloudflare's network before they reach your connector, so Cloudflare sees the traffic and its edge enforces Access policy. With OpenZiti, NetBird or Pomerium, the traffic path is your own: OpenZiti's private routers make only outbound connections, so you need no inbound firewall rules, but you must run a public router or proxy that clients can reach, and you own its availability. Confirm with your security team whether data residency or contractual terms require that Cloudflare stop handling application traffic at all, because that answer decides whether a self-hosted entry point is mandatory rather than optional.

Plan for the features Tunnel's edge provided for free. DDoS mitigation, a web application firewall, caching and global anycast reachability do not come with any of these tools, so you need to decide who supplies them and at what cost. Before you cut over, export your tunnel routes and Access policies, list which hostnames and protocols each one serves, and check that your chosen option covers every item on that list. Any route that fails this check is a reason to keep part of the setup on Cloudflare during the transition.

Mapping Cloudflare Tunnel capabilities to open-source options

This table maps each thing Cloudflare Tunnel does for published internal services to OpenZiti, NetBird and Pomerium, and marks where none of them is a substitute. Read each row as a question to confirm in the project documentation before you commit, since the supplied research covers architecture and licensing more than every feature detail. The main takeaway is that the connector pattern is replaceable, but the edge services Cloudflare runs in front of traffic are not.

CapabilityOpenZitiNetBirdPomerium
Outbound-only connectorPrivate routers and tunnelers connect outbound only, so no inbound firewall rules are needed.Routing peers join the WireGuard overlay and connect out to the management and relay services.Pomerium routes run on a proxy you place in the private network, reached through your ingress.
HTTP publishing with identity gatingWorks for services via tunnelers or SDKs, but web publishing usually needs an extra HTTP front end you build or add.Access is controlled by groups and rules for network resources, not as a browser login gate on a public hostname.Core use case: clientless access to internal web apps with SSO and policy in front of each route.
Non-web TCP and UDP accessStrong fit: dark services with no open ports, host and application access models.Strong fit: any IP, port or protocol reachable through the overlay, with SSH under central policies.Supports TCP and UDP through the Pomerium CLI or desktop app on Zero plans, per the pricing page. Confirm Core behavior.
DNS and TLS handlingService names resolve through the tunneler or SDK configuration. Certificates are x509 identities inside the fabric, not public TLS.Private DNS is built in, and the self-hosted quickstart uses Traefik with Let's Encrypt for the management domain.You manage public TLS and DNS for each route hostname. Plan certificate renewal and DNS records yourself.
Routing to external networksReach hosts behind an edge router in a trusted zone (network access model). Confirm routing design per deployment.Routes to external networks and exit nodes are part of the product, per the README.Routes point at upstream services, but reachability to non-HTTP networks depends on the deployment. Confirm.
Audit loggingController and router logs are yours to collect. Confirm event detail and export options in the docs.Activity and traffic event logging is listed, with traffic logging and streaming on the Business plan.Access and audit logs are on Zero plans. Session recording for SSH is reserved for Enterprise.
DDoS, WAF and CDNNot replaced. An overlay does not provide edge filtering or caching for public traffic.Not replaced. Overlay peers do not provide edge protection or content delivery.Not replaced. Put your own edge or load balancer and WAF in front if you publish public web apps.

When OpenZiti, NetBird or Pomerium fits best

Cloudflare Tunnel publishes internal services through an outbound-only connector and Cloudflare's edge. Each open-source option below keeps that outbound-only pattern but moves the entry point, the identity checks and the data path into your own environment, so the right choice depends on which traffic you need to publish and who should run the control plane.

OpenZiti for dark services

Choose OpenZiti when the services are not web applications, or when one service calls another and no human browser sits in the path. Tunnelers run beside Linux, Windows, macOS, iOS or Android endpoints, and SDKs in Go, C, Python, Node.js, Java, Swift and C# embed identity directly in an application. The controller issues x509 identities and holds the access policy, while private edge routers make only outbound connections, so the service can stay dark with no open inbound ports. The trade-off is engineering effort: you run the controller, identity issuance and router mesh yourself, and you must decide early which of the three deployment models (network, host or SDK access) each service will use.

OpenZiti README

NetBird routing peers for networks

Choose NetBird when the goal is to reach whole private subnets or internal hosts from managed devices, not to publish one service to the public. A routing peer inside the target network advertises its routes, and clients reach them over a WireGuard overlay that is peer-to-peer where possible and falls back to a relay when direct paths fail. Groups, rules, posture checks and activity logs govern access. The trade-off is licensing and operations: NetBird's clients are BSD-3-Clause, but the management, signal and relay components are AGPLv3, so have counsel review that license against how you modify or host them, and plan backups and upgrades yourself.

Pomerium Core for web access

Choose Pomerium Core when the internal assets are web applications, dashboards or SSH and TCP endpoints that users reach from a browser or CLI, and you want an identity-aware proxy in front of them without a client on every device. Pomerium Core is Apache-2.0 and self-run, and it checks identity and policy on each request before traffic reaches the application. The trade-off to check first is the control plane: the self-hosted control plane is reserved for Pomerium's Enterprise edition, so confirm whether you need it for directory sync, RBAC for administrators or session management before you commit to the open-source route.

Mapping routes to a single tool

Use this card to decide before a pilot starts which Cloudflare Tunnel routes map to which option. Web hostnames usually move to a Pomerium route, private networks to a NetBird routing peer, and service-to-service or non-web traffic to OpenZiti services. Mixing options is common, but each one adds its own identity provider integration, certificate handling and log pipeline. Inventory every tunnel route first, then group them by protocol and by who needs access, so you do not discover a non-HTTP service halfway through the cutover.

What changes when traffic stops passing through Cloudflare's network

With Cloudflare Tunnel, a request from a user reaches Cloudflare's edge first, and the cloudflared connector then pulls it back in over an outbound connection. Moving to OpenZiti, a NetBird routing peer or a Pomerium proxy changes that path. With OpenZiti, the service or its tunneler dials out to an edge router and clients reach it through the overlay, so no public hostname has to terminate at a third party. With Pomerium, your own proxy receives the request directly. In both cases, you become the operator of the entry point, and you should document which hosts, ports and routers are now internet-facing before you cut over DNS.

Certificate and DNS ownership moves with that role. Under Tunnel, Cloudflare terminates TLS at the edge and manages the public hostname records for your zone. Self-hosted replacements need you to issue and renew certificates, for example through a Let's Encrypt setup such as the Traefik default in NetBird's self-hosting quickstart, and to point DNS at your own public router or proxy. Confirm who holds the DNS zone and certificate renewal runbook, because an expired certificate on a proxy you run will break access that Cloudflare previously handled. Logs also relocate. Access and request logs that Cloudflare kept in its dashboard now live in your proxy, router or NetBird and OpenZiti activity logs, so decide where they are shipped, how long they are retained, and who can read them.

Running your own relay or public router adds availability and capacity planning that Cloudflare's network absorbed. Plan for a public endpoint sized for peak connection counts, DDoS and volumetric exposure handled by your upstream network or a separate provider, redundant routers or proxies, and a tested failover path. NetBird's self-hosting quickstart also lists the minimum host requirements and the ports that must be open, and its documentation states that self-hosted operators handle backups, upgrades and scaling themselves. Ask your vendor or implementation partner to write down the capacity and failover targets for your environment, and check whether any traffic still traverses a third party, such as a relay used for NAT traversal, before you describe the new setup to auditors.

Choosing the replacement by environment

Most Cloudflare Tunnel deployments publish web applications and gate them with Access policies. For these, a Pomerium proxy is usually the closest match, because it is an identity-aware reverse proxy that serves web apps without a VPN client. Pomerium Core is Apache-2.0 and runs on your own servers, but the self-hosted control plane is reserved for its Enterprise edition, so plan for that before you need it.

  • Edge protection: Cloudflare's DDoS, WAF and CDN functions do not move with the tunnel. Decide whether you need a separate WAF or edge provider.
  • Identity provider: Confirm that your IdP (Entra ID, Okta, Google or Keycloak, for example) is on Pomerium's supported list and that group claims arrive as your policies expect.
  • TLS and DNS: Certificates and public DNS records move to your infrastructure, so confirm who renews them and how.
  • Route limits: If you use Pomerium Zero, check the route, policy and cluster limits on the pricing page against your app count.
  • Upstream exposure: Confirm the proxy is the only path to each app, so direct origin access cannot bypass the identity check.

Confirm these items with your application owners before you change DNS for production hostnames.

How the replacement paths connect users to internal services

The flow starts with a user device reaching either Pomerium or an OpenZiti public router, where the identity provider login happens before any request is forwarded. The connector inside the private network, a Pomerium proxy or an OpenZiti private router or tunneler beside the service, opens an outbound connection to that entry point, so the internal network accepts no inbound firewall rules for this path. The Cloudflare edge is shown as absent, because application traffic does not pass through Cloudflare's network. Check that the identity provider session is enforced at the entry point and that the connector can reach the entry point over outbound ports only.

Self-hosted paths: traffic reaches internal apps without Cloudflare's network or inbound firewall rules.

Running a replacement alongside Cloudflare DNS and edge services

Most teams do not need to leave Cloudflare entirely. DNS, WAF, DDoS protection and CDN can stay in place while only the tunnel path for internal services moves, but each hostname then has to resolve to exactly one path at a time. The cards below cover what stays, what moves, and what to confirm before any record changes.

Keep Cloudflare for DNS and edge

Cloudflare can remain the authoritative DNS and edge layer while the tunnel path changes. Only the hostnames you migrate should point at the new entry point, and every other record stays untouched. Before changing anything, list each public hostname, its record type and whether the proxy (orange cloud) is enabled, because a proxied record routes through Cloudflare's network regardless of what sits behind it.

Partial routing during cutover

During transition the same application may be reachable through both cloudflared and the new proxy, depending on DNS caching, client resolvers and split DNS. Run both paths in parallel for each hostname, confirm which one clients actually reach, and keep a documented rollback that restores the original record. Access policies on the old path do not apply to the new path, so an unmigrated policy can silently become a gap.

Pomerium front door and certificates

A Pomerium proxy is an ingress you run, so it needs its own public or internal address, a DNS record that points to it, and a certificate for each route hostname. Confirm whether TLS terminates at Cloudflare (proxied records with a Cloudflare-issued certificate) or at your proxy with a certificate you manage, and whether the origin accepts connections only from Cloudflare's network addresses during transition.

Pomerium identity docs

NetBird routing peer endpoints

NetBird routing peers reach internal networks over a WireGuard overlay, so internal services are not published on a public hostname at all unless you add one. The DNS question shifts to private resolution: clients need a name that resolves to the internal address through NetBird's private DNS or your internal resolver. Confirm which hostnames stay public, which become private, and how split DNS is configured for each.

OpenZiti public routers and identities

OpenZiti services are dark by default, and only public edge routers accept connections from the internet. A public router hostname is a new endpoint you must register in DNS and certify, and it does not replace the hostname your users know unless you publish that name. Confirm which routers are public, where their certificates come from, and whether clients that use the SDK or tunneler reach the service by identity rather than by hostname.

OpenZiti README

Cloudflare WAF, DDoS and CDN scope

Moving the tunnel path does not move protection for web traffic that remains proxied through Cloudflare. A WAF rule or rate limit applied to a hostname stops applying once that hostname resolves elsewhere, so review rules per hostname before cutover. Keep a list of which protections still cover each public name, and add equivalent controls at the new entry point where you need them.

Moving published services off cloudflared without an outage

The sequence keeps each published service reachable while its traffic moves from Cloudflare Tunnel to the replacement, so the cutover happens one hostname at a time and the old connector is retired only after access and logs are confirmed on the new path. It also makes clear what leaves with the Cloudflare account when the tunnels are deleted.

  1. Inventory tunnels, routes and hostnames

    Export every tunnel, public hostname, private network route and the Access application that protects it through the Cloudflare API or the Terraform provider, and keep the output in version control. Record which connector runs each tunnel, the origin service it points to, and the owner of each hostname. Done means you have one list in which every published service has a named owner, an origin address and a current policy. Confirm the export covers every account and zone your team uses, because a missed hostname will break at the moment the tunnel is removed.

  2. Classify each service as web, SSH or TCP

    Sort each entry by protocol. Web applications can usually move to a Pomerium route with a clientless browser path, while SSH and raw TCP services need either Pomerium's native SSH or TCP access through its CLI or desktop app, or an OpenZiti service where the protocol is not HTTP. Mark any service that depends on a Cloudflare-specific feature such as WARP device checks or edge caching, since these have no direct self-hosted counterpart. Done means every row carries a protocol class and a target platform, and the features that will be lost are written down for the owner to accept or fix.

  3. Stand up the replacement alongside the tunnel

    Deploy the chosen replacement in your own environment next to the existing cloudflared connector, using a new hostname or a private test name so that live traffic keeps flowing through Cloudflare. For OpenZiti, this means a controller, edge routers and a tunneler or SDK beside each service. For Pomerium, it means a proxy with the routes defined but not yet published on the production DNS name. Done means a test user can reach each replacement route through the new path, and the origin services show the expected connection source.

  4. Move DNS and certificates for each hostname

    Cut over one hostname at a time. Lower the DNS record time to live in advance if your DNS provider allows it, issue or import the TLS certificate for the hostname on the new proxy, and then repoint the record from the Cloudflare tunnel target to the new ingress. Keep the tunnel route in place until the step below passes, so you can revert the record quickly. Done means the public name resolves to your ingress, the certificate chain validates from an external client, and the previous route is still available for rollback.

  5. Reconnect identity to the same provider

    Configure the replacement to use the identity provider that Access used, such as Microsoft Entra ID, Okta or Google, through the OAuth 2.0 and OIDC settings your platform documents. Recreate group-based rules from the exported Access policies, and confirm that MFA requirements carry over. Test with a user in each group, including one that should be denied. Done means each test account gets the expected result, and the denied account is blocked at the new proxy rather than at the origin.

  6. Verify logs, access and rollback

    Confirm that the new platform writes access and audit events to your own log pipeline, and that the events carry user identity, route and decision fields you will need for investigations. Check that the logs from Cloudflare still cover the period before cutover, and export them if you need them for retention. Run a short rollback drill by repointing one hostname back to the tunnel. Done means you have a log sample from the new path, a documented rollback procedure, and sign-off from the service owner.

  7. Retire cloudflared and delete tunnel routes

    After every hostname has run on the new path for the period your owners agreed, stop the cloudflared connectors, delete the tunnel routes and public hostnames through the API or Terraform, and remove the Access applications that no longer protect anything. Tunnels, routes and account-level limits such as the number of tunnels and seats belong to the Cloudflare account, so they cannot be carried over, and any license or plan you keep needs its own review. Done means no tunnel is active, the Cloudflare configuration matches your export with the retired items marked, and the inventory is archived.

Account limits and what you no longer inherit

Moving off Cloudflare Tunnel ends a managed service, so the first thing to inventory is what that service was doing for you. The cloudflared connector ran on your hosts, but Cloudflare handled its upgrades, its edge routing and the failover between its own data centers. With OpenZiti, the connector role moves to a private edge router that makes only outbound connections, with a NetBird routing peer or a Pomerium proxy as the alternatives. In each case you own the patching, high availability and monitoring of the connector. Before cutover, decide who runs those tasks, how a failed connector is detected, and how many instances you need in each network segment.

Cloudflare also sat in front of published hostnames as an edge layer. Any DDoS absorption, managed WAF rules, rate limiting or bot filtering that your account applied at that edge will not follow the traffic into your network. Export the rule sets and zone settings you actually use, then assign each one to an owner: your upstream provider, an on-premises WAF, or the application itself. Only the Cloudflare account can show which of these features were enabled, so confirm that list with your account administrator before you change DNS. The Zero Trust seat model is a separate cost line; check your current terms with Cloudflare, since per-seat billing and bundled features can change.

A hosted comparison point is Pomerium Zero, which runs the Pomerium Core cluster in your environment while Pomerium hosts the control plane. Its pricing page lists Zero Personal with 1 cluster, 10 routes and 5 policies, and Zero Business with 5 clusters, 100 routes, 100 policies and 5 custom domains. Count your published hostnames, route groups and policies today, then compare those counts with the tier you would need, because a route is the unit that will hit the limit first. Treat these figures as a snapshot, and confirm current limits on the Pomerium pricing page for any hosted tier you consider. If you run Pomerium Core yourself, ask the vendor or community which capacity limits apply to your own deployment.

Questions buyers ask before replacing Cloudflare Tunnel

How much effort does replacing Cloudflare Tunnel take?

The effort depends mainly on how many services you publish, whether they are web apps or non-web protocols, and how many identity sources and DNS zones are involved. Web apps behind a Pomerium proxy are usually the smallest change, because they keep HTTP routing and map to a route and policy per application. Private TCP, UDP and service-to-service traffic with OpenZiti takes more design work, because you must define identities, services, edge routers and policies before anything works. Ask any provider to break its estimate into the inventory of services, the identity integration, the network and DNS changes, the testing and the cutover, so you can see which part drives the total. Effort is one-time for the build, then recurs for upgrades, monitoring and certificate and key handling.

Can our team run a self-hosted replacement without outside help?

A team with Linux, container and identity administration experience can run these components, but the work is more than installing software. You own the controller or proxy, its high availability, certificates, backups, upgrades and the logs that auditors will ask for, and nothing is handed to a vendor when a component fails. OpenZiti in particular requires someone to manage x509 identities and policies for every participant. Before deciding, check whether your staff can cover on-call duties for these components, and whether they have the time to keep up with releases. Many teams use an outside partner for the first build and documentation, then take over operations, or retain a partner for ongoing upgrades and testing.

How long does a migration from Cloudflare Tunnel take?

The duration is driven by the number of published services, how many depend on Cloudflare-specific features, the number of hostnames whose DNS and certificates must move, and how many change windows your organization allows for cutover. Each service also needs its policies rebuilt and tested against the same identity provider. Run old and new paths side by side during cutover so you can roll back a single service without affecting the others. No duration is given here because the inputs vary widely between environments; ask for a written schedule that lists each phase, its exit criteria and the owner of each step.

What does the internal team need to provide during a migration?

Plan for named people in five areas: an owner for the service inventory and business sign-off on each route, a network or platform engineer for hosts, firewalls and outbound connectivity, an identity administrator for the provider and group mappings, a DNS and certificate owner, and a security reviewer who approves policies. Someone must also be able to export your current Cloudflare Access applications, policies, groups and tunnel routes through the API or Terraform provider. Without these inputs, the migration stalls at discovery, so agree the roles and their time commitment before work starts.

Can OpenZiti or NetBird replace Cloudflare's edge DDoS protection and WAF?

No. OpenZiti and NetBird are overlay networks for authenticated, encrypted access between identities and services. They do not provide internet-scale DDoS mitigation, a web application firewall, a global CDN or bot management. If you publish public-facing web applications today and rely on Cloudflare for those protections, you need a separate edge service, such as a self-hosted WAF in front of your proxy, a cloud provider's DDoS service or a managed edge provider, and you should keep that layer in your architecture review. Confirm the scope of each tool against your threat model before retiring any Cloudflare feature.

Does NetBird's AGPLv3 license affect how we use it internally?

The license depends on which part of the repository you use. NetBird's clients are under BSD-3-Clause, while the management, signal and relay servers are under AGPLv3. Running the server unmodified inside your organization is a common use, but AGPLv3 requires that if you modify the server and make it available to users over a network, you must offer those users the corresponding source. Some organizations also have policies on AGPL components that require legal review. Ask your legal or compliance team to review the license terms against your planned use, and record the decision, including whether you plan any changes to the server code.

What does a self-hosted NetBird server need in ports and VM size?

The self-hosting quickstart asks for a Linux VM with at least 1 CPU and 2 GB of memory, a public domain, TCP ports 80 and 443 open, UDP port 3478 open, and Docker with the Compose plugin. The combined configuration runs management, signal, relay and STUN, plus a dashboard, a Traefik reverse proxy with Let's Encrypt by default, and an embedded Dex identity provider. Those are minimum values from the quickstart, so size larger for more users and traffic, and plan for backups, upgrades and scaling, which the operator handles. Confirm the current requirements in the NetBird documentation before provisioning.

How DeployOpen scopes and delivers a Tunnel replacement

DeployOpen plans and implements self-hosted open-source platforms inside the client's own cloud accounts, data centers or air-gapped networks. For a Cloudflare Tunnel replacement, that means mapping which internal services are published, choosing between OpenZiti, a NetBird routing peer or a Pomerium proxy, and delivering the result with documented controls and evidence.

How we scope

  • Inventory every hostname, service and protocol currently published through cloudflared connectors and routes.
  • Classify each service as web, SSH, TCP or non-web, since that decides between Pomerium, NetBird and OpenZiti.
  • Agree the written scope, deliverables and timeline in writing before any work starts, with fixed scope as the usual model.

How we build

  • Deploy the chosen controller, routers or proxies in your infrastructure with high availability and private outbound connectors.
  • Connect your existing identity provider, configure MFA and map Access policies to groups, routes or service policies.
  • Test each published service for access control, revoked-session behavior and logging before cutover.

How we hand over

  • Deliver configuration as code, with the export of Cloudflare Access applications and tunnel routes documented alongside it.
  • Document the architecture, DNS and certificate ownership, backup procedures and the steps to retire each cloudflared tunnel.
  • Provide evidence of access logs, policy settings and remote access controls for your compliance and security reviews.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Plan upgrades for OpenZiti, NetBird or Pomerium releases you choose to adopt, including a retest of published services.
  • Confirm with your own team who owns the controller, the connectors and the identity provider after go-live.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.