Newer Version Available
Scratch Orgs
| Available in: Salesforce Classic and Lightning Experience |
| Dev Hub available in: Enterprise, Performance, and Unlimited Editions |
| Scratch orgs available in: Developer, Enterprise, Group, and Professional Editions |
Scratch orgs drive developer productivity and collaboration during the development process, and facilitate automated testing and continuous integration. You can use the CLI or IDE to open your scratch org in a browser without logging in. You might spin up a new scratch org when you want to:
- Start a new project.
- Start a new feature branch.
- Test a new feature.
- Start automated testing.
- Perform development tasks directly in an org.
- Start from “scratch” with a fresh new org.
Scratch Orgs Created in Government Cloud or Public Cloud
The Dev Hub org instance determines where scratch orgs are created.
- Scratch orgs created from a Dev Hub org in Government Cloud are created in a Government Cloud instance.
- Scratch orgs created from a Dev Hub org in Public Cloud are created on a Public Cloud instance.
Scratch Org Allocations and Considerations
To ensure optimal performance when you’re using Salesforce DX, your Dev Hub org edition determines your scratch org allocations. These allocations determine how many scratch orgs you can create daily, and how many can be active at a given point. By default, Salesforce deletes scratch orgs and their associated ActiveScratchOrg records from your Dev Hub org when a scratch org expires. A scratch org expires in 7 days unless you set a duration when you create it.
- 200 MB for data
- 50 MB for files
| Edition | Active Scratch Org Allocation | Daily Scratch Org Allocation |
|---|---|---|
| Enterprise Edition | 40 | 80 |
| Unlimited Edition | 100 | 200 |
| Performance Edition | 100 | 200 |
| Dev Hub trial | 20 | 40 |
To try out Salesforce DX, sign up for a Dev Hub trial org. Trial Dev Hubs expire after 30 days, and each trial Dev Hub gets 10 user licenses.
List Active and Daily Scratch Orgs
To view how many scratch orgs you have allocated, and how many you have remaining: