Roll Back a Deployment
When a deployment breaks your service, you can roll back to any previous successful deployment. Rollback creates a new deployment using the old image and configuration — it does not revert your code or settings.
From the dashboard
Section titled “From the dashboard”- Navigate to your service’s Deployments tab.
- Find the deployment you want to roll back to (it must have been ACTIVE at some point).
- Click the Rollback button on that deployment.
- Confirm the rollback.
Clank creates a new deployment using the target deployment’s Docker image, environment variable snapshot, port, health check config, and resource limits. The new deployment goes through the normal lifecycle: DEPLOYING → HEALTH_CHECKING → ACTIVE.
From the CLI
Section titled “From the CLI”clank rollback --service <service-id> --deployment <deployment-id>Or roll back to the most recent successful deployment:
clank rollback --service <service-id>What gets restored
Section titled “What gets restored”When you roll back to a previous deployment, the new deployment uses:
- The original Docker image tag
- The original environment variables (the exact snapshot from that deployment, not current values)
- The original port and health check configuration
- The original resource limits (CPU, memory)
- The original domain assignments
Requirements
Section titled “Requirements”Rollback requires the original Docker image to still be available:
- Registry images: Always available. Git-built images that have been pushed to the Clank registry can be rolled back.
- External images (Docker Hub, GHCR): Always available as long as the tag still exists on the remote registry.
- Local-only images: Git-built images that were never pushed to the registry may have been cleaned up from the server’s local Docker daemon. These cannot be rolled back.
The dashboard shows a “Rollback capable” badge on deployments whose images are confirmed available.
Rollback vs Redeploy
Section titled “Rollback vs Redeploy”| Rollback | Redeploy | |
|---|---|---|
| Image | Old deployment’s image | Old deployment’s image |
| Env vars | Old deployment’s snapshot | Current service env vars |
| Health check | Old deployment’s config | Current service config |
| Use when | Something broke, restore everything exactly | Want same image but with updated config |
Next steps
Section titled “Next steps”- Deployments — Full deployment lifecycle and blue-green behavior.