[Bug] 1.14.2: captain-captain crashes on startup ("not 0 instances of captain-certbot"), causing all three system services to restart in a loop
Author: zx331789Created Jul 1, 2026Updated Jul 2, 2026
Bug Report: captain-captain crashes on startup with "not 0 instances" error, causing all three services to restart in a loop
Environment
- CapRover version: 1.14.2
- Docker version: 29.6.1
- Docker API version: 1.55 (minimum supported: 1.40)
- OS: Linux (x86_64)
What happened?
After upgrading to CapRover 1.14.2, the captain-captain service crashes immediately on startup with the following error:
Error: There must be only one instance (not 0) of the service running to find node id. captain-certbot
at /usr/src/app/built/docker/DockerApi.js:108:23
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)This causes a cascade restart loop across all three CapRover system services:
captain-captain— crashes with exit code 1captain-nginx— force-killed and restartedcaptain-certbot— reports "No such container" and restarts
The cycle repeats approximately every 90 seconds, indefinitely.
Root cause (observed)
During startup, captain-captain queries the node ID of captain-certbot. However, since captain-certbot has not yet fully started (0 running instances at that moment), the check throws an unhandled exception and the process exits with code 1.
This appears to be a race condition introduced in 1.14.2 — the startup sequence does not wait or retry before querying captain-certbot's node ID.
Relevant code path: DockerApi.js:108
Dockerd logs showing the crash loop
level=error msg="fatal task error" error="task: non-zero exit (1)" service.id=<captain-captain-id>
level=info msg="image pulled" remote="docker.io/caprover/caprover:1.14.2" ← immediate re-pull
level=error msg="fatal task error" error="task: non-zero exit (1)" ← crash againAdditional notes
- Also observed a secondary warning in logs:
client version 1.38 is too old— this comes from the Docker API version probe inDockerApi.tswhich usesv1.38as a low-version probe. This is a pre-existing cosmetic issue and does not cause the crash, but worth noting alongside this ticket. - The same setup running CapRover 1.14.1 on Docker 29.3.0 (API 1.54) works without any issues.
Source: caprover/caprover