Skip to content
Chris edited this page Apr 22, 2025 · 20 revisions

Banner

Maintenance OS CPU Architectures Generic badge Docker Pulls made-with-python GitHub issues GitHub last commit GitHub commit activity

DockFlare automates Cloudflare Tunnel ingress rule management based on Docker container labels, simplifying public exposure of your Dockerized applications. It eliminates manual Cloudflare configuration, acting as a self-hosted ingress controller.

Web ui example

Key Features

  • Automated Cloudflare Tunnel Management: Creates/uses a specified tunnel, retrieves Tunnel ID & Token.
  • cloudflared Agent Lifecycle: Deploys & manages the cloudflared container (using Tunnel Token).
  • Dynamic Ingress via Docker Labels:
    • Monitors Docker events for containers with labels (prefix: cloudflare.tunnel.): enable="true", hostname="subdomain.example.com", service="http://target:port".
    • Automatically updates Cloudflare Tunnel configuration to match running, labeled containers.
  • Multi-Domain Support: Configure multiple domains for a single container using indexed labels, each with its own service target and zone configuration.
  • Graceful Deletion: Configurable grace period before removing ingress rules when a container stops.
  • State Persistence: Saves managed_rules to state.json for restarts.
  • Optimized Reconciliation:
    • On startup, ensures consistency between Docker containers, saved state, and Cloudflare configuration
    • Processes DNS operations in small batches to prevent API rate limiting
    • Shows real-time reconciliation progress in the UI
  • Web UI: Status dashboard with:
    • Tunnel & agent status.
    • Start/Stop agent controls.
    • Managed ingress rule list with status, container ID, deletion time, and "Force Delete" option.
  • Real-time Log Streaming: View logs in real-time using Server-Sent Events (SSE).
  • Content Security Policy (CSP): Ensures secure loading of resources and compatibility with reverse proxies.

This Wiki provides detailed information on getting started, configuration options, usage patterns, and troubleshooting.

Clone this wiki locally