How I Fixed Coolify + Traefik + Cloudflare Tunnel 404/503 Issues (Without Reinstall)
All my applications deployed via Coolify suddenly started returning 404 / 503, while only the Coolify dashboard domain was working. Containers were healthy, Cloudflare Tunnel was up, configs looked correct — yet nothing routed. The root cause was not Cloudflare, not Traefik config, not Docker, but a stale Docker API environment leaked into the Coolify Traefik proxy state. This post explains how I diagnosed it and fixed everything without reinstalling Coolify or touching application data.
All domains, IPs, and identifiers in this article are intentionally masked.
Symptoms
Only
coolify.<domain>workedAll application domains returned 404 Not Found
Containers showed healthy in Docker
Cloudflare Tunnel connected successfully
curl -H "Host: <app.domain>" http://127.0.0.1→ 404Traefik logs spammed:
client version 1.24 is too old. Minimum supported API version is 1.44
Common (But Wrong) Assumptions
At first, I suspected:
❌ Cloudflare Tunnel misconfiguration
❌ Domain / DNS issues
❌ Broken Traefik YAML
❌ Missing port exposure
❌ Outdated Docker Engine
All of these turned out to be false.
The Red Flag: Docker API Version Mismatch
On the host machine:
Docker Engine: v29.x
Docker API: 1.52
Inside the Traefik container:
Traefik: v3.1.x
docker-cli: API 1.45
Yet Traefik logs still complained about API 1.24.
That contradiction was the key.
Root Cause (The Important Part)
Traefik does not use the system docker-cli when talking to Docker.
Instead, it uses its embedded Docker client, which:
Respects the
DOCKER_API_VERSIONenvironment variableSilently downgrades its behavior if that variable exists
In my case:
Coolify had previously generated a Traefik proxy with an old environment state
A stale
DOCKER_API_VERSION=1.24leaked into the proxy containerTraefik Docker provider was effectively running blind
This caused:
Continuous provider retries
Partially created routers
Domains never attaching to services
Random 404 / 503 responses
Key Diagnostic Checks
These checks narrowed it down quickly:
Docker socket mount was correct:
/var/run/docker.sock
Traefik container inspection:
traefik version→ OKdocker version→ API 1.45
Logs still reporting 1.24 → environment override
The Fix (No Full Reinstall Needed)
You do NOT need to reinstall Coolify.
Only the proxy layer must be reset.
Steps
Open Coolify UI → Settings → Proxy
Click Delete Proxy
On the server, remove proxy state
docker stop coolify-proxy
docker rm coolify-proxy
rm -rf /data/coolify/proxy
rm -rf /data/coolify/proxy
Back in Coolify UI, click Create Proxy
What this does:
Regenerates Traefik from scratch
Removes stale environment variables
Rebuilds dynamic configs cleanly
Leaves apps, volumes, and databases untouched
Verification
After recreating the proxy:
Traefik logs no longer mentioned API 1.24
Docker provider stabilized immediately
Routers appeared correctly
Cloudflare Tunnel routed traffic properly
All application domains started working
Lessons Learned
When Coolify apps fail but containers are healthy, check the proxy first
Docker Engine version alone doesn’t guarantee compatibility
Traefik Docker provider can silently inherit bad environment state
404 / 503 errors are often infrastructure-level, not app-level
Who Might Hit This Issue?
Anyone upgrading Coolify over time
Long-lived servers
Users migrating Traefik versions
Cloudflare Tunnel users
Final Thoughts
I was minutes away from doing a full reinstall.
Instead, a clean proxy reset solved everything.
Correct diagnosis beats brute-force reinstall every time.
If your Coolify setup looks correct but refuses to route traffic, reset the proxy before touching anything else.
Hiç yorum yok:
Yorum Gönder