Rollbacks

Go back to a deployment that worked, in seconds from a kept build or in minutes from its commit.

Every build leaves an image on the server. A rollback runs that image again: seconds, no rebuild. It needs the rollback_apps capability.

  • Only the code goes back. Variables, domains, volumes and resource limits stay as they are now.
  • It is a normal deployment, with its own row, logs and activity entry, marked as a rollback.
  • Only apps Deplo builds can roll back: from a repository or an uploaded archive.

Roll back

Open Deployments

Open the app, then Deployments.

Deployment history: every build with its commit, duration and result, the list 'Roll back' starts from

Roll back

Click Rollback in the deployment's menu, or on the deployment's page, and confirm.

The per-deployment actions menu on an older build

The Rollback button in the app header goes straight to the newest deployment before the live one. With nothing left to go back to, it opens the app's Backups.

When the build is no longer kept

An app from a repository rebuilds that deployment's commit, for example 4abcdef, then releases it. The confirmation says rebuilt first - this takes a few minutes. This also covers a deployment that ran on another server. The rebuild keeps its own image, so the next time is instant.

An uploaded archive has no commit: only builds still kept on its current server.

Retention

Rollbacks kept, the number of old deployments kept ready to go back to

Settings -> Deployments, the Releases card, field Rollbacks kept.

Default3
Maximum20
0No instant rollbacks. An app from a repository still rolls back by rebuilding

The server keeps Rollbacks kept + 1 images per app, the live one included. A rollback that re-runs a kept image takes no slot. Older images go in the Docker cleanup after each deploy.

Good to know

  • A rolled-back app still auto-deploys. The next push replaces it: turn off Deploy on push first if the branch is broken.
  • A rebuild uses today's build settings, root directory included.
  • A database migration does not roll back with the code. For data, use Backups.

Troubleshooting

SymptomWhat to check
Rollback is greyed outYou do not have rollback_apps, or no earlier build is left to go back to.
Rollback is not in a deployment's menuThe deployment failed, is a pull request preview, is already live, or re-ran another one's image. On an uploaded archive, its build is past Rollbacks kept or stayed on another server.
"too old to build a specific commit"Update the server's agent from Settings -> Servers.
"commit 4abcdef is no longer in the repository"A force push or a repository change removed it. Pick another deployment.
The bug is still there after the rollbackIt is in configuration or data, not in the code.

More in Deploys and builds.

Next steps

Did this page help you?

On this page