How it works
When you runsst deploy, it acquires a lock on your state file to prevent concurrent deploys.
However, if something unexpectedly kills the sst deploy process, or if you manage to run sst deploy concurrently, the lock might not be released.
This should not usually happen, but it can prevent you from deploying. You can run sst unlock to release the lock.
When to use
You might need to runsst unlock if:
- A deploy process was killed unexpectedly (e.g., CI timeout, manual termination)
- You see an error about the state being locked
- Multiple deploy processes were accidentally run at the same time
- The previous deploy crashed without cleaning up
Examples
Unlock your personal stage
Unlock a specific stage
Important notes
Only use when necessary
Only runsst unlock when you’re certain no other deploy process is running. If you unlock while a deploy is in progress, it could lead to state corruption.
Verify no active deploys
Before runningsst unlock, make sure:
- No
sst deployorsst devcommands are running - CI/CD pipelines are not actively deploying
- No other team members are deploying to the same stage
Related
sst deploy- Deploy your applicationsst refresh- Refresh your app state- State documentation - Learn more about SST state