๐ฉ๏ธ DockFlare โ Cloudflare Tunnel Manager
Host: Homelab ยท Compose: Homelab/DockFlare/compose.yaml
Stack name: dockflare
1. Overview
DockFlare is a self-hosted manager for Cloudflare Tunnels. It watches Docker container labels (prefixed dockflare.) and automatically creates/updates Cloudflare Tunnel routes (DNS + Access policies) for any labelled service โ eliminating the need to open ports in your router. A Redis cache backs the routing state. A dedicated dockflare-rules busybox sidecar holds labels for services that run on other hosts (NAS, Proxmox, etc.) without their own Docker daemon.
2. Architecture & Services
| Service |
Image |
Port |
Role |
docker-socket-proxy |
tecnativa/docker-socket-proxy:v0.4.2 |
โ |
Secure proxy for Docker socket (read-only label events) |
dockflare |
alplat/dockflare:v3.1.2 |
5000 |
Core service: reads labels, manages Cloudflare Tunnel routes |
dockflare-redis |
redis:7.4.7-alpine |
โ |
In-memory state cache for DockFlare |
dockflare-rules |
busybox:1.38.0 |
โ |
Sidecar container holding dockflare.* labels for non-Docker services |
3. Networking
dockflare-internal โ Internal bridge network for DockFlare โ Redis โ Socket Proxy communication.
cloudflare-net โ External network shared with all services that DockFlare proxies through Cloudflare Tunnel. The tunnel daemon itself runs separately (managed by Cloudflare).
Managed Tunnel Routes (from dockflare-rules)
| Index |
Hostname |
Upstream |
| 0 |
n6.m1ckyb.com |
Proxmox https://192.168.10.10:8006 |
| 1 |
cockpit.m1ckyb.com |
Cockpit https://192.168.10.123:9090 |
| 2 |
git.m1ckyb.com |
Forgejo http://forgejo-server:3000 |
| 3 |
seerr.m1ckyb.com |
Jellyseerr http://192.168.10.119:5055 |
| 4 |
komodo.m1ckyb.com |
Komodo http://192.168.10.114:9120 |
| 5 |
pbs.m1ckyb.com |
Proxmox Backup Server https://192.168.10.250:8007 |
| 6 |
photos.m1ckyb.com |
Immich http://immich_server:2283 |
| 16 |
obsidian.m1ckyb.com |
Obsidian (Cloudflare Access protected) |
| 19 |
code.m1ckyb.com |
Code Server (Access: rem-access group) |
| 21 |
grafana.m1ckyb.com |
Grafana |
| 23 |
n8n.m1ckyb.com |
N8N automation |
| 24 |
chat.m1ckyb.com |
Open WebUI (AI chat) |
| 27 |
lab.m1ckyb.com |
HomeLab dashboard |
| ... |
(and 20+ more) |
See compose for full list |
4. Persistent Storage
| Container |
Host Path |
Description |
dockflare |
/docker/data/services/dockflare/data |
DockFlare state / DB |
dockflare-redis |
/docker/data/services/dockflare/redis |
Redis persistence (disabled โ in-memory only) |
5. Environment Variables
| Variable |
Service |
Description |
REDIS_URL |
dockflare |
Redis connection string |
DOCKER_HOST |
dockflare |
Routed via socket proxy (tcp://docker-socket-proxy:2375) |
TZ |
dockflare |
Australia/Sydney |
| Cloudflare credentials |
.env |
CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_TUNNEL_ID |
6. Access & Usage
| URL |
Description |
https://dockflare.m1ckyb.com |
DockFlare web UI |
http://localhost:5000 |
Direct local access |
# Start the stack
docker compose -f Homelab/DockFlare/compose.yaml up -d
# Check DockFlare logs
docker logs dockflare -f
7. Maintenance & Backup
# Update
docker compose -f Homelab/DockFlare/compose.yaml pull
docker compose -f Homelab/DockFlare/compose.yaml up -d
# Backup DockFlare data
rsync -av /docker/data/services/dockflare/ /backup/dockflare/
[!NOTE]
If DockFlare loses its state (Redis cleared), it will re-read all container labels on next start and recreate routes. No manual intervention needed.