Dokploy shows running container as not running (no green icon and cannot stop)
To Reproduce
Use this compose:
services:
agent-zero:
image: agent0ai/agent-zero
container_name: agent-zero
ports:
- "21671:80"
volumes:
- agent_zero_data:/a0/usr
- /opt/flutter:/opt/flutter:ro
extra_hosts:
- "host.docker.internal:host-gateway"
restart: unless-stopped
volumes:
agent_zero_data:
driver: local
Deploy it. Stop it. Restart docker. Go to log tab to observe the container is running but the compose app doesn't have green icon and the stop button cannot be tapped.
Current vs. Expected behavior
Expected: The app has green icon and the stop button can be tapped.
Provide environment information
OS: Arch Linux x86_64
Kernel: Linux 7.0.11-1-cachyos-bore
Dokploy: v0.29.8
Which area(s) are affected? (Select all that apply)
Docker Compose
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
This is the same root cause as your earlier report in #4227 [1]. When Dokploy stops a compose app it runs docker compose stop, which only pauses containers without removing them or clearing their restart policies. Since your compose file has restart: unless-stopped, Docker brings the container back up after a daemon restart — but Dokploy's internal state still considers it "stopped," so the UI shows no green icon and no stop button.
The UI status is driven by Dokploy's own state rather than querying the actual container status in real time, which creates this mismatch.
Workaround: Run docker compose -p <project-name> down to fully remove the containers after stopping via Dokploy. They'll be recreated on next deploy. This is more reliable than docker update --restart=no since there are no containers left for Docker to restart [2].
A proper fix would require Dokploy to either switch its stop operation to docker compose down, set --restart=no on containers when stopping, or reconcile its UI state with the actual container state on load.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.