Dokploy/dokploy
Database backup fail when database is in worker node
Open
#3,516 opened on Jan 25, 2026
bughelp wanted
Repository metrics
- Stars
- (34,231 stars)
- PR merge metrics
- (Avg merge 3d 12h) (28 merged PRs in 30d)
Description
To Reproduce
- Setup a worker in your swarm
- Add a label to the worker (eg.
docker node update --label-add type=database <node-name>) - Setup a postgres database application to the worker (don't deploy yet)
- Add a constraint to the postgres database application
{
"Constraints": [
"node.labels.type == database", // or whatever you label the worker
"node.role == worker"
]
}
- Deploy the database application
- Setup database backup
- Manually trigger the backup
Current vs. Expected behavior
Currently It throws an error
Initializing backup
[Sat Jan 24 04:02:23 UTC 2026] Starting backup process...
[Sat Jan 24 04:02:23 UTC 2026] Executing backup command...
[Sat Jan 24 04:02:23 UTC 2026] ❌ Error: Container not found
Expected Database backup created successfully.
Provide environment information
Operating System: Ubuntu 24.04.3 LTS (manager and worker vps)
Dokploy Version: v0.26.5
VPS Provider: Hetzner
What applications/services are you trying to deploy: Database
Which area(s) are affected? (Select all that apply)
Databases
Are you deploying the applications where Dokploy is installed or on a remote server?
Remote server
Additional context
I have done some digging and the reason this happened is because the backup command code on packages/server/src/utils/backups/postgres.ts
await execAsync(backupCommand, {
shell: "/bin/bash",
});
is ran on the manager vps. But since the database is in a worker (different vps), it couldn't find the container, hence the error.
Will you send a PR to fix it?
Yes