debug
Debug a failed or stuck Dokploy deployment with full decision-tree analysis Arguments: app-name-or-id|compose-id.
SKILL.mddokploy-dev/skills/debug/SKILL.md
GitHubDebug Failed Deployment
Run the full debug-deploy workflow against an application or compose stack — locate the failed run, read build logs, inspect container state, check Traefik, optionally AI-summarise, and recover.
Arguments
Format: [app-name-or-id|compose-id] (optional)
- If a UUID is passed, treat it as either an
applicationIdorcomposeIdand disambiguate by callingapplication-onefirst, falling back tocompose-one. - If a name is passed, call
project-allto resolve. - If no argument is passed, call
mcp__plugin_dokploy-dev_dokploy__deployment-allCentralizedandmcp__plugin_dokploy-dev_dokploy__deployment-queueList, list the recenterror/ stuck deployments, and ask the user which to investigate.
Parse from "$ARGUMENTS".
Process
Read ${CLAUDE_PLUGIN_ROOT}/skills/debug-deploy/SKILL.md and follow every step in order. Do not skip.
Key checkpoints:
- Step 0 — Platform health. Run
settings-health,checkInfrastructureHealth(returnspostgres/traefikstatus),getDockerDiskUsage, and on v0.30+ the read-only host checkdocker-getServerHealth(disk, memory, inotify, network IP pools, daemon errors) plusdocker-getEvents { minutes }for recent daemon activity. If any fail, fix server before deploy issue. - Step 1 — Locate the failed run. Use
deployment-allfiltered by the resource ID. SavedeploymentId. - Step 2 — Read the logs (Dokploy v0.29.0+ — runtime logs are first-class over MCP/REST/CLI; see the
read-logsskill). Build failure →deployment-readLogs { deploymentId, tail }. Runtime crash →application-readLogs { applicationId, tail, since, search }for an app, or read every container of a compose stack:docker-getContainersByAppNameMatch { appName, appType: "docker-compose" }thencompose-readLogs { composeId, containerId, tail, since, search }per container (or/dokploy-dev:compose-logs). Match against the build-failure pattern table. - Step 3 — Container introspection.
docker-getContainersByAppLabel { appName, type: "standalone" }for state/health.docker-getConfigfor command/mounts/networks (itsEnvis[REDACTED]by default since@dokploy/mcp0.30.0 — diagnose env problems from the logs, see thedebug-deployskill "Env and credentials"). Usedocker-restartContainer/killContainerif wedged. - Step 4 — Request path. Only if container is running but HTTP requests fail.
application-readTraefikConfig, check port, network, listen address. - Step 5 — Recovery. Use the smallest action that unblocks:
killBuild/cancelDeployment/cleanQueues/deployment-removeDeployment/rollback-rollback. Confirm destructive ops with the user. - Step 6 — AI summary. If
ai-getEnabledProvidersis non-empty, pass the log text from Step 2 toai-analyzeLogs { aiId, logs, context: "build" | "runtime" }and present the result. Otherwise note that AI is not configured and continue manually. - Step 7 — Verify the fix. After applying a fix,
application-redeploy(orcompose-redeploy), polldeployment-alluntilstatus: done, validate domains, hit the endpoint with curl.
Output format
Report findings in this structure:
## Diagnosis: <appName / composeName>
**Failed deployment:** <deploymentId> (status: error, started: <timestamp>)
**Build log:** <logPath>
### Root cause
<one-paragraph plain-language explanation>
### Evidence
- <log excerpt 1>
- <container state observation>
- <traefik / domain observation if relevant>
### AI summary (if available)
<ai-analyzeLogs output, condensed>
### Recommended fix
<concrete action, with the exact MCP call(s) needed>
### Recovery commands
<list of MCP calls to apply the fix and redeploy>
After applying a fix, re-verify before declaring the issue resolved.
Example Usage
/dokploy-dev:debug
/dokploy-dev:debug web-frontend
/dokploy-dev:debug abc123-def456