Dokploy/dokploy · error
Error deploying Application
Error message
Error deploying Application
What it means
Inner catch of the refresh-token deploy handler: an exception occurred while preparing the deployment (parsing commit info, building the queue job, or during the bullmq add). It logs via logWebhookError and responds 400 'Error deploying Application' — a generic wrapper around the real error.
Source
Thrown at apps/dokploy/pages/api/deploy/[refreshToken].ts:289
if (IS_CLOUD && application.serverId) {
jobData.serverId = application.serverId;
deploy(jobData).catch((error) => {
console.error("Background deployment failed:", error);
});
} else {
await myQueue.add(
"deployments",
{ ...jobData },
{
removeOnComplete: true,
removeOnFail: true,
},
);
}
} catch (error) {
logWebhookError("Error deploying Application:", error);
res.status(400).json({ message: "Error deploying Application" });
return;
}
res.status(200).json({ message: "Application deployed successfully" });
} catch (error) {
logWebhookError("Error deploying Application:", error);
res.status(400).json({ message: "Error deploying Application" });
}
}
/**
* Return the image name without the tag
* Example: "my-image" => "my-image"
* Example: "my-image:latest" => "my-image"
* Example: "my-image:1.0.0" => "my-image"
* Example: "myregistryhost:5000/fedora/httpd:version1.0" => "myregistryhost:5000/fedora/httpd"
* @link https://docs.docker.com/reference/cli/docker/image/tag/
*/View on GitHub (pinned to 546686ea35)
Solutions
- Check the Dokploy server logs for the logWebhookError entry — it contains the underlying error
- Send a well-formed payload (e.g. X-GitHub-Event / push body with commits)
- Verify the application has a complete deployment configuration
- Confirm Redis is up (docker ps) since deployments are enqueued via bullmq
Defensive patterns
Strategy: try-catch
Validate before calling
// before firing webhook, ensure app has a complete deployment config
const app = await getApp(id);
if (!app.buildType || !app.sourceType) throw new Error('Incomplete deployment config'); Try / catch
const r = await fetch(deployUrl, ...);
if (r.status === 400) { const logs = await fetchServerLogs(); /* correlate logWebhookError entry */ } Prevention
- Monitor server logs for logWebhookError entries when webhooks fail
- Keep Redis healthy — deploys depend on the bullmq queue
- Send well-formed payloads from CI
When it happens
Trigger: Malformed webhook body (no commit info headers/payload), missing deployment environment/config on the application, or a Redis/queue failure when enqueueing the deploy job.
Common situations: CI sends a body the commit-message extractor can't parse; application's build configuration incomplete (no build type/commit SHA); Redis unavailable so the queue add throws.
Related errors
- Error deploying Compose
- Automatic deployments are disabled for this application
- BAD_REQUEST
- INTERNAL_SERVER_ERROR
- INTERNAL_SERVER_ERROR
AI-assisted analysis of Dokploy/dokploy@546686ea35 (2026-08-27).
Data as JSON: /api/errors/566eb00f04db7d84.
Report an issue: GitHub.