Dokploy healthcheck causes endless restart loop although the application is working.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
To Reproduce
Description
My Dokploy instance enters an endless restart loop when the default healthcheck is enabled.
The strange part is that the application itself appears to be working correctly:
- Container logs look normal.
- No startup errors are visible.
- The web interface becomes accessible when the healthcheck is disabled.
- The issue seems to be limited to the healthcheck itself.
Current vs. Expected behavior
Steps to Reproduce
Current behavior:
- Dokploy service starts.
- Service remains in
Starting. - Healthcheck eventually fails.
- Docker marks the container as unhealthy.
- Service restarts.
- The cycle repeats indefinitely.
Workaround
Disabling the healthcheck immediately fixes the issue:
docker service update --no-healthcheck dokploy
docker service scale dokploy=0
sleep 10
docker service scale dokploy=1
After doing this:
- Dokploy starts successfully.
- The dashboard is accessible.
- All expected functionality appears to work normally.
Important Observation
The problem returns as soon as I restore the default healthcheck:
docker service update --health-cmd=default dokploy
docker service scale dokploy=0
sleep 10
docker service scale dokploy=1
The service immediately goes back to the restart loop.
Logs
I checked the container logs and did not find any obvious startup errors.
The logs appear essentially identical whether the healthcheck is enabled or disabled.
Because the application works correctly when the healthcheck is removed, I suspect the healthcheck may be producing false negatives or may not be compatible with my current environment.
Provide environment information
## Environment
* OS: Ubuntu 22.04
* Deployment: Docker Swarm
* Dokploy version: v0.29.7
* Docker version: v29.5.3
* VPS Provider: Contabo
* Arch: x86_64
Which area(s) are affected? (Select all that apply)
Installation, Application, Databases, Docker Compose, Local Development
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
No response
Will you send a PR to fix it?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is identified. Start by reproducing the default healthcheck failure in Docker Swarm on the reported environment, then inspect the configured healthcheck command and its results while the application remains accessible. Done means the service stays healthy and no longer enters the restart loop with the default healthcheck enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100