What problem will this feature address?
Currently, the deployment queue page (/dashboard/deployments?tab=queue) provides very limited actions for queued jobs. The Cancel button only appears for cloud-hosted instances and only when a job is in the active state. There is no way to:
- Cancel jobs that are in
pending, waiting, or delayed states (only active jobs can be cancelled, and only on cloud).
- Delete/remove jobs from the queue at all, even after they've completed or failed.
- Remove stuck jobs that may be lingering in the queue.
This means users have no control over jobs that are waiting in the queue before they start processing, and completed/failed jobs stay in the view with no way to clean them up.
Describe the solution you'd like
Add action buttons to each row in the deployment queue table:
-
Cancel button — Available for jobs in pending, waiting, delayed, and active states. This should cancel the job via BullMQ's job.discard() or job.remove() to prevent it from being processed. Currently, cancellation only works for active jobs on cloud — this should be extended to all self-hosted users and all pre-processing states.
-
Delete/Remove button — Available for jobs in completed, failed, and cancelled states. This removes the job from the queue entirely so it no longer clutters the queue view.
The Actions column should show the appropriate button(s) based on the job's current state:
pending / waiting / delayed → Cancel
active → Cancel
completed / failed / cancelled → Delete
Describe alternatives you've considered
- "Clear all completed/failed" button — A bulk action to clean up finished jobs instead of per-row deletion. This would be a nice addition but doesn't replace the need for individual control.
- Auto-cleanup of completed jobs — The queue already has
removeOnComplete: true and removeOnFail: true set when adding jobs, so completed jobs should already be cleaned up. However, in practice they still appear in the queue view, suggesting the cleanup may not be working as expected or there's a delay. Adding explicit delete buttons would give users immediate control regardless.
Additional context
The current queue table is located at apps/dokploy/components/dashboard/deployments/show-queue-table.tsx. The cancel functionality already exists for cloud instances (api.application.cancelDeployment and api.compose.cancelDeployment), so extending it to self-hosted and additional states would primarily involve:
- Adding a new API route that calls BullMQ's
Job.remove() / Job.discard() directly on the queue
- Updating the
show-queue-table.tsx component to show cancel/delete buttons based on job state
- Removing the
isCloud gate on the cancel button
Relevant queue files:
apps/dokploy/server/queues/deployments-queue.ts — Queue worker
apps/dokploy/server/queues/queueSetup.ts — Queue setup utilities
apps/dokploy/server/api/routers/deployment.ts — Queue list API
Will you send a PR to implement it?
Yes, I plan to submit a PR to implement this feature.
What problem will this feature address?
Currently, the deployment queue page (
/dashboard/deployments?tab=queue) provides very limited actions for queued jobs. The Cancel button only appears for cloud-hosted instances and only when a job is in theactivestate. There is no way to:pending,waiting, ordelayedstates (onlyactivejobs can be cancelled, and only on cloud).This means users have no control over jobs that are waiting in the queue before they start processing, and completed/failed jobs stay in the view with no way to clean them up.
Describe the solution you'd like
Add action buttons to each row in the deployment queue table:
Cancel button — Available for jobs in
pending,waiting,delayed, andactivestates. This should cancel the job via BullMQ'sjob.discard()orjob.remove()to prevent it from being processed. Currently, cancellation only works foractivejobs on cloud — this should be extended to all self-hosted users and all pre-processing states.Delete/Remove button — Available for jobs in
completed,failed, andcancelledstates. This removes the job from the queue entirely so it no longer clutters the queue view.The Actions column should show the appropriate button(s) based on the job's current state:
pending/waiting/delayed→ Cancelactive→ Cancelcompleted/failed/cancelled→ DeleteDescribe alternatives you've considered
removeOnComplete: trueandremoveOnFail: trueset when adding jobs, so completed jobs should already be cleaned up. However, in practice they still appear in the queue view, suggesting the cleanup may not be working as expected or there's a delay. Adding explicit delete buttons would give users immediate control regardless.Additional context
The current queue table is located at
apps/dokploy/components/dashboard/deployments/show-queue-table.tsx. The cancel functionality already exists for cloud instances (api.application.cancelDeploymentandapi.compose.cancelDeployment), so extending it to self-hosted and additional states would primarily involve:Job.remove()/Job.discard()directly on the queueshow-queue-table.tsxcomponent to show cancel/delete buttons based on job stateisCloudgate on the cancel buttonRelevant queue files:
apps/dokploy/server/queues/deployments-queue.ts— Queue workerapps/dokploy/server/queues/queueSetup.ts— Queue setup utilitiesapps/dokploy/server/api/routers/deployment.ts— Queue list APIWill you send a PR to implement it?
Yes, I plan to submit a PR to implement this feature.