Rollback a Deployment
If a deployment breaks your app, you can revert to any previous working version in seconds. This guide covers how to find your deployment history, choose a version to restore, and run the rollback.
What Is a Deployment ID?
Section titled “What Is a Deployment ID?”Every time you run varitykit app deploy, Varity assigns a unique deployment ID in the format deploy-<unix-timestamp>:
deploy-1737492000deploy-1737491000deploy-1737484800The timestamp is when the deployment was created. You use this ID to reference specific deployments when rolling back, checking logs, or inspecting status.
Step 1 — Find Your Deployment History
Section titled “Step 1 — Find Your Deployment History”List all deployments for the current app:
varitykit app listOutput:
ID Status URL Deployeddeploy-1737492000 live https://your-app.varity.app 2 hours agodeploy-1737491000 archived https://v2.your-app.varity.app 1 day agodeploy-1737484800 archived https://v1.your-app.varity.app 2 days agoThe live deployment is your current production version. archived deployments are still available for rollback.
Step 2 — Inspect a Deployment (Optional)
Section titled “Step 2 — Inspect a Deployment (Optional)”Before rolling back, confirm the version you want by checking its details:
varitykit app info deploy-1737491000This shows the build timestamp, hosting type, and URL for that deployment.
Step 3 — Run the Rollback
Section titled “Step 3 — Run the Rollback”Revert to the chosen deployment:
varitykit app rollback deploy-1737491000Varity creates a new deployment using that version’s configuration. Your app URL stays the same — users are automatically served the restored version.
Output:
✓ Rolling back to deploy-1737491000...✓ Deployment restored✓ Live at: https://your-app.varity.app✓ New deployment ID: deploy-1737492100Rollback via AI Editor (MCP)
Section titled “Rollback via AI Editor (MCP)”If you’re using the Varity MCP server, you can trigger a rollback directly from your AI editor:
- List deployments: ask “Show me my deployment history” →
varity_deploy_status - Identify the target ID from the list
- Deploy the rollback: ask “Redeploy deploy-1737491000” →
varity_deploywith the archived version’s configuration
Caveats
Section titled “Caveats”Environment variable changes
Section titled “Environment variable changes”If the broken deployment introduced new environment variables that your code now depends on, rolling back the code alone may not be enough. Check your environment variables after rolling back.
Database schema changes
Section titled “Database schema changes”If your app ran database migrations between the broken version and the target version, rolling back the app code may leave the schema ahead of the code. Test your app after rollback before considering it stable.
Static vs dynamic deployments
Section titled “Static vs dynamic deployments”Both static and dynamic deployments support rollback. For dynamic deployments, rollback also restores the container configuration, but does not restore database contents.
Verify the Rollback Worked
Section titled “Verify the Rollback Worked”After rolling back, confirm the app is working:
varitykit app statusCheck the URL in your browser and confirm the expected behavior is restored.
Related
Section titled “Related”- Deploy Your App — full deployment guide
- Debugging Failed Deployments — diagnose the problem before you rollback
- CLI Reference: deploy — all deploy command options
- MCP Server —
varity_deploy_status,varity_deploy_logs