Roll Back a Service
Every time a deploy of a service succeeds, the panel saves that version of the service. Roll back deploys a saved version again. Use it when an update or a settings change made an app worse and you want the version that worked.
What a saved version holds
A saved version (a snapshot) records what the deploy really started:
- each image by its digest, the registry's unchangeable fingerprint of the image, not by a tag like
latestthat can move to a newer image; - the app's Compose file as it was deployed;
- the environment variables that are not marked sensitive, with their values;
- the names of the sensitive variables, never their values;
- resource limits, ports and the domain list (for display).
Generated passwords stay in the panel's vault. The saved Compose file points at them, the same way the running app does; their values are never copied into a snapshot.
Before the first update of an app after the panel was upgraded to this version, the panel saves the version that runs at that moment. The service Story marks it Before the first update. It also includes settings you had saved but not yet deployed at that time.
Roll back
- Open the service and find History. It starts collapsed to the latest deployment: select Show history to open the list, then choose Deploys to show deployments and saved versions.
- Find the saved version you want. The one running now is marked Running now.
- Click Roll back to this version and read the confirmation.
- Click Roll back. The deploy runs like a Redeploy; follow it on the service page.
If a deploy fails partway through, the Deploy section of the service page offers Roll back to the previous version. That goes back to the version the failed deploy replaced. When there is no saved version yet, the same place offers Stop the service instead, which stops the containers and keeps them.
What a rollback changes, and what it keeps
| After a rollback | |
|---|---|
| Images | The saved digests, pulled again from the registry |
| Compose file, resource limits, ports | As in the saved version |
| Environment variables that are not sensitive | As in the saved version: changed values return, variables added since are removed. A variable that was sensitive when the version was saved keeps its current value |
| Sensitive environment variables and generated passwords | Stay as they are now. A secret is usually changed because it was rotated or leaked; a rollback never brings an old one back. A sensitive variable deleted since stays deleted: enter it again under Configuration → Edit environment |
| Domains | Stay as they are now. Domains have DNS records and certificates outside the panel |
| Data (databases, uploaded files) | Not rolled back. Restore a backup if you need older data |
The images are pulled and checked before anything changes. If a registry no longer has a saved image, the rollback is refused and the app keeps running its current version. The same holds when the saved version's resource limits are above what the customer's plan allows now, or when the saved version had no limit (0) for CPU, memory or disk where the app has one now: the rollback fails with the reason in the deployment history, and nothing changes. A platform operator can raise the plan first.
Pinned until you redeploy
After a rollback the app stays on the saved images. A restart, a secret rotation or a move to another customer does not quietly bring the newer version back. Redeploy removes the pin and pulls the newest images for the tags again, which is what Redeploy always does.
When Roll back is not offered
| The saved version says | Why |
|---|---|
| Rollback is not available for apps built from a Compose file in their repository | The panel reads that Compose file from the repository at each build and does not keep it, so it cannot recreate those containers. A platform operator can redeploy, which builds again. |
| This version was saved before the app's passwords moved to the vault | Rolling back would write the old passwords back into the app. |
| Settings only: the image of this version is no longer on the server | The image of an app built from Git, or of an image that is in no registry, was removed. |
Git apps built from a Dockerfile are rolled back by starting the image the saved version ran; nothing is cloned or built, and the next push builds as before.
How many versions are kept
The panel keeps the newest 10 saved versions of each app and deletes older ones.
Who can roll back
Rollback needs the Deploy services permission (services.deploy), the same as Redeploy: a rollback is a redeploy of an earlier version. A reseller or organization admin sees and rolls back only apps of customers they manage, and only versions saved while the app belonged to its current customer. While a customer is suspended, only a platform operator can roll back its apps. Every rollback request is written to the audit log as service.rollback.requested.
API
| Action | Endpoint | Success |
|---|---|---|
| List saved versions | GET /api/v1/services/{id}/snapshots | 200 |
| Show one | GET /api/v1/services/{id}/snapshots/{snapshotId} | 200 |
| Roll back | POST /api/v1/services/{id}/rollback, optional body {"snapshotId": "…"} | 202 |
See Services API for the answers and the 409 codes.