Fix a failing healthcheck blocking the deploy on Coolify
Error: Healthcheck failed / Container is unhealthy
Coolify's healthcheck never reports the new container healthy, so Traefik won't route to it and the deploy stalls or rolls back, surfacing a 404 / "No available server".
Coolify runs the healthcheck inside the container using curl or wget; the official docs state the container must have one of them installed. The check fails when (a) the base image ships neither curl nor wget (common on alpine/slim/distroless/scratch, and on multi-stage builds that install them only in the build stage), (b) the configured port or path doesn't match a route the app actually answers with a 2xx, or (c) the app binds to a different interface than the check targets. Until the check passes, Traefik won't send traffic and Coolify keeps the old container live or rolls back.
The fix
Open Configuration > Healthchecks and confirm the Path and expected response code match a route your app actually answers with 2xx (e.g. path /, code 200). A wrong path returns a non-2xx status and the check fails.
Make sure the container's runtime stage has curl or wget; the Coolify docs require one of them for healthchecks. Slim/alpine/distroless images often ship neither, and multi-stage builds drop them if they're only added in the build stage.
# Debian/Ubuntu base RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* # Alpine base RUN apk add --no-cache wgetAdd a lightweight health route if your app has no cheap 200 endpoint, then point the healthcheck Path at it.
// e.g. Express app.get('/health', (_req, res) => res.sendStatus(200))For Dockerfile / Docker Compose deploys, define the healthcheck in the Dockerfile or compose file; per the docs it takes precedence over the UI settings. wget is often more reliable than curl in minimal images.
HEALTHCHECK --interval=10s --timeout=5s --retries=5 \ CMD wget -qO- http://127.0.0.1:3000/health || exit 1If you just need it live now (a one-off job, or a container with no shell tools and no HTTP route), toggle the healthcheck off under Configuration > Healthchecks, redeploy, then re-enable once you've added curl/wget and a proper check.
Verify it worked
Coolify marks the container Healthy and the deploy completes/swaps in the new container; docker inspect reports health status healthy.
docker inspect --format '{{.State.Health.Status}}' <container-name>Related Coolify errors
- Timeout / no response / container not starting
- no available server (Traefik 503) behind your Coolify domain after a successful deploy
- 502 Bad Gateway (Traefik)
- ECONNREFUSED / ENOTFOUND / connection to server at "postgres" port 5432 failed
Sources
- coolify.io/docs/knowledge-base/health-checks
- github.com/coollabsio/coolify/issues/7500
- github.com/coollabsio/coolify/discussions/2140
- github.com/coollabsio/coolify/issues/1867
Configuration reference: Umami. Ports, environment variables, volumes and the release timeline, each row linked to its upstream source.