Skip to content

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.

  1. Navigate to your service’s Deployments tab.
  2. Find the deployment you want to roll back to (it must have been ACTIVE at some point).
  3. Click the Rollback button on that deployment.
  4. 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.

Terminal window
clank rollback --service <service-id> --deployment <deployment-id>

Or roll back to the most recent successful deployment:

Terminal window
clank rollback --service <service-id>

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

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.

RollbackRedeploy
ImageOld deployment’s imageOld deployment’s image
Env varsOld deployment’s snapshotCurrent service env vars
Health checkOld deployment’s configCurrent service config
Use whenSomething broke, restore everything exactlyWant same image but with updated config
  • Deployments — Full deployment lifecycle and blue-green behavior.