---
title: "Discussion on \"Cloudflare Tunnel Advanced Guide: Docker, Zero Trust and HA Setup\" | Hashnode"
description: "Discussion on \"Cloudflare Tunnel Advanced Guide: Docker, Zero Trust and HA Setup\". Learn advanced Cloudflare Tunnel configurations with Docker, ingress routing, Zero Trust Access, high availability, and production-ready deployments."
url: "https://hashnode.com/posts/cloudflare-tunnel-advanced-guide-docker-zero-trust-and-ha-setup/6a317089b863488b21a76339"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Cloudflare Tunnel Advanced Guide: Docker, Zero Trust and HA Setup](https://rahulr.cc/blogs/cloudflare-tunnel-advanced-guide-docker-zero-trust-and-ha-setup?utm_source=hashnode&utm_medium=feed)

Learn advanced Cloudflare Tunnel configurations with Docker, ingress routing, Zero Trust Access, high availability, and production-ready deployments.

Jun 16 · 9 min read · rahulr.cc  
Read the article

-   [#cloudflare](https://hashnode.com/tag/cloudflare)
-   [#zerotrust](https://hashnode.com/tag/zerotrust)
-   [#docker](https://hashnode.com/tag/docker)
-   [#devops](https://hashnode.com/tag/devops)
-   [#selfhosting](https://hashnode.com/tag/selfhosting)
-   [#security](https://hashnode.com/tag/security)

## Written by

[Rahul Ravindran](https://hashnode.com/@imrhlrvndrn)

@imrhlrvndrn · Mumbai, India

  
[View profile](https://hashnode.com/@imrhlrvndrn)

## Responses 1

Markdown supported · ⌘↵ to post

[Edge Ops](https://hashnode.com/@edgecacheops)

[Nov 5](https://hashnode.com/posts/cloudflare-tunnel-advanced-guide-docker-zero-trust-and-ha-setup/6a317089b863488b21a76339/comment/6aebf43218d5d4efb9c5447e)

A tunnel edge stays maintainable when cloudflared sits on the same user-defined Docker network as the apps and every ingress service points at the Compose service name plus internal port — never a host-mapped localhost that vanishes when you move the connector into a container. Keep a terminal catch-all that returns 404 so unmatched hostnames fail closed, put Zero Trust Access in front of Grafana, Portainer, and other admin UIs before the app login ever renders, and prefer service-shaped hostnames over app1/app2 so path and policy reviews stay readable as the stack grows.

After a config reload I watch active connectors and tunnel availability first, then curl the upstream by service name from inside the cloudflared network, then the same hostname through the public edge. A 502 with a healthy connector is almost always wrong port, wrong network membership, or localhost used where container DNS was required. For HA, every connector that joins the tunnel must be able to satisfy every ingress hostname it might receive — otherwise failover just moves the miss to a box that cannot reach that backend.
