You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMPORTANT: Currently this Mode is under heavy development and not recommended.
290
-
DockFlare can manage DNS and Access Applications for an existing `cloudflared` tunnel that you manage separately.
285
+
> [!CAUTION]
286
+
> **ADVANCED USERS ONLY - HIGH POTENTIAL FOR MISCONFIGURATION**
287
+
>
288
+
> External `cloudflared` mode is powerful but requires a **deep understanding of Docker networking and Cloudflare Tunnels.** Misconfiguration can easily lead to services being unreachable or DockFlare being unable to manage resources correctly.
289
+
>
290
+
> **Proceed with extreme caution and only if you are comfortable managing `cloudflared` and Docker network configurations independently.** This mode is **not recommended** for users new to Docker or Cloudflare Tunnels.
291
+
292
+
DockFlare can integrate with an existing `cloudflared` tunnel that you manage completely separately (i.e., not started or configured by DockFlare). In this mode, DockFlare focuses on DNS and Cloudflare Access Application management for that tunnel.
* For DockFlare to successfully interact with your services when using an external `cloudflared` tunnel, **all relevant containers (DockFlare itself, your target application containers, and potentially your externally managed `cloudflared` agent if it needs to resolve services by Docker DNS) must share a common Docker network and be able to communicate.**
297
+
* You are responsible for ensuring that the "Service Address" you define in DockFlare (via labels or UI) is resolvable and reachable from your *externally managed* `cloudflared` agent.
298
+
* Incorrect network setup is the most common source of issues in this mode.
299
+
300
+
**To Use External Mode:**
291
301
292
-
**To use External Mode:**
293
-
1. Set `USE_EXTERNAL_CLOUDFLARED=true` in your `.env`.
294
-
2. Set `EXTERNAL_TUNNEL_ID` to your existing tunnel's ID.
295
-
<details>
296
-
<summary>Find Your Tunnel ID</summary>
297
-
298
-
1. Log in to [Cloudflare Dashboard](https://dash.cloudflare.com).
299
-
2. Navigate to **Zero Trust** -> **Access** -> **Tunnels**.
300
-
3. Select your tunnel. The ID is in the URL and on the overview page.
301
-
</details>
302
+
1. Set `USE_EXTERNAL_CLOUDFLARED=true` in your `.env` file.
303
+
2. Set `EXTERNAL_TUNNEL_ID` in your `.env` file to your existing tunnel's UUID.
304
+
<details>
305
+
<summary>How to Find Your Existing Tunnel ID</summary>
306
+
307
+
1. Log in to the [Cloudflare Dashboard](https://dash.cloudflare.com).
308
+
2. Navigate to **Zero Trust** -> **Access** -> **Tunnels**.
309
+
3. Select your desired pre-existing tunnel.
310
+
4. The Tunnel ID (a UUID) is displayed on the tunnel's overview page and is also present in the URL.
311
+
</details>
302
312
303
313
**DockFlare's Behavior in External Mode:**
304
-
- DockFlare will **not** start or manage a `cloudflared` agent container.
305
-
- It **will** create/delete CNAME DNS records pointing to your `EXTERNAL_TUNNEL_ID`.
306
-
- It **will** create/update/delete Cloudflare Access Applications based on labels or UI interactions for services it manages.
307
-
- It will **not** modify the tunnel's ingress rules directly (as this is typically managed by the external `cloudflared` agent's configuration file).
314
+
315
+
* ✅ **WILL** create/update/delete CNAME DNS records in your configured Cloudflare zones, pointing to your `EXTERNAL_TUNNEL_ID`.
316
+
* ✅ **WILL** create/update/delete Cloudflare Access Applications based on Docker labels or UI interactions for services it manages.
317
+
* ❌ **WILL NOT** start, stop, or manage a `cloudflared` agent Docker container. You are fully responsible for the lifecycle and configuration of your `cloudflared` agent.
318
+
* ❌ **WILL NOT** modify the tunnel's ingress rules via the Cloudflare API. Ingress routing (which public hostnames/paths map to which internal services) must be configured directly in your externally managed `cloudflared` agent's configuration file (e.g., `config.yml`). DockFlare assumes your external `cloudflared` agent is already correctly routing traffic for the hostnames it manages DNS for.
308
319
309
320
> [!WARNING]
310
321
> **Authoritative DNS Management in External Mode:**
311
-
> When `USE_EXTERNAL_CLOUDFLARED=true`, DockFlare assumes it has authoritative control over CNAME records in the specified zones that point to the `EXTERNAL_TUNNEL_ID`. It may remove CNAMEs it doesn't recognize as actively managed by its rules if they point to the same tunnel ID. Ensure no other systems are creating CNAMEs for this specific external tunnel in the zones DockFlare monitors.
322
+
> When `USE_EXTERNAL_CLOUDFLARED=true`, DockFlare assumes it has **authoritative control** over CNAME DNS records in the specified Cloudflare zones that point to the `EXTERNAL_TUNNEL_ID`.
323
+
>
324
+
> * It **may remove CNAME records** it doesn't recognize as actively managed by its current rules if those CNAMEs point to the same `EXTERNAL_TUNNEL_ID` within the monitored zones.
325
+
> * Ensure no other systems or manual configurations are creating CNAMEs for this specific external tunnel in the zones DockFlare monitors, as they might be overwritten or deleted.
326
+
327
+
**Before Enabling External Mode, Ensure You Can Answer "Yes" To:**
328
+
329
+
1. Do I have a `cloudflared` tunnel already running and configured independently of DockFlare?
330
+
2. Does my external `cloudflared` agent's configuration file (`config.yml`) correctly define ingress rules for the services I want DockFlare to manage DNS/Access for?
331
+
3. Are DockFlare, my target application containers, and my external `cloudflared` agent (if resolving services by Docker DNS) all on a shared Docker network that allows them to communicate as needed?
332
+
4. Am I comfortable troubleshooting Docker networking issues independently?
333
+
5. Do I understand that DockFlare will manage DNS records pointing to my external tunnel ID and may remove conflicting ones?
334
+
335
+
If you cannot confidently answer "yes" to all these questions, using DockFlare's default managed `cloudflared` mode is strongly recommended.
0 commit comments