{"record":{"id":"5acbc117ee668808","repo":"Dokploy/dokploy","slug":"automatic-deployments-are-disabled-for-this-applic","errorCode":null,"errorMessage":"Automatic deployments are disabled for this application","messagePattern":"Automatic deployments are disabled for this application","errorType":"http","errorClass":null,"httpStatus":400,"severity":"warning","filePath":"apps/dokploy/pages/api/deploy/[refreshToken].ts","lineNumber":62,"sourceCode":"\t\t}\n\t\tconst application = await db.query.applications.findFirst({\n\t\t\twhere: eq(applications.refreshToken, refreshToken as string),\n\t\t\twith: {\n\t\t\t\tenvironment: {\n\t\t\t\t\twith: {\n\t\t\t\t\t\tproject: true,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tbitbucket: true,\n\t\t\t},\n\t\t});\n\n\t\tif (!application) {\n\t\t\tres.status(404).json({ message: \"Application Not Found\" });\n\t\t\treturn;\n\t\t}\n\t\tif (!application?.autoDeploy) {\n\t\t\tres.status(400).json({\n\t\t\t\tmessage: \"Automatic deployments are disabled for this application\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst deploymentTitle = extractCommitMessage(req.headers, req.body);\n\n\t\tconst deploymentHash = extractHash(req.headers, req.body);\n\t\tconst sourceType = application.sourceType;\n\n\t\tif (sourceType === \"docker\") {\n\t\t\tconst applicationImageName = extractImageName(application.dockerImage);\n\t\t\tconst applicationDockerTag = extractImageTag(application.dockerImage);\n\n\t\t\tconst webhookImageName = extractImageNameFromRequest(\n\t\t\t\treq.headers,\n\t\t\t\treq.body,\n\t\t\t);","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/Dokploy/dokploy/blob/546686ea3587f12ec5652217dedd9f7960fb6d15/apps/dokploy/pages/api/deploy/[refreshToken].ts#L44-L80","documentation":"Same deploy webhook handler: the application was found by refresh token, but its autoDeploy flag is false, so the endpoint refuses with 400 'Automatic deployments are disabled for this application'.","triggerScenarios":"Calling the deploy webhook while the application's 'Automatic Deploy' toggle is off in Dokploy settings.","commonSituations":"Someone disabled auto-deploy temporarily and forgot to re-enable; the app was recreated with autoDeploy defaulting to false; external CI still firing on every push.","solutions":["Enable 'Automatic Deploy' in the application's deployment settings","Or remove/disable the external webhook if manual deploys are intended","Re-verify with a test payload after enabling"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const app = await db.query.application.findFirst({ where: eq(application.refreshToken, token) });\nif (!app?.autoDeploy) throw new Error('Enable auto-deploy first');","typeGuard":null,"tryCatchPattern":"if (res.status === 400 && body.message.includes('disabled')) { await enableAutoDeploy(appId); retry(); }","preventionTips":["Check the autoDeploy toggle before wiring external CI","Include the flag in deployment checklists"],"tags":["webhook","deploy","auto-deploy","disabled"],"backgroundTag":"feature-flag-disabled","analyzedSha":"546686ea3587f12ec5652217dedd9f7960fb6d15","analyzedAt":"2026-08-27T05:18:58.095Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}