Skip to main content

Scratch Orgs

Use short-lived scratch orgs for isolated Salesforce development and testing, created from your Dev Hub.

Try it in Serpent

Scratch orgs are short-lived, disposable Salesforce environments for isolated development and testing. They are created from a Dev Hub and torn down when you are done, so each piece of work can start from a clean org.

New Scratch Org dialog with definition and duration fields

Create one in Serpent

Open the Scratch Orgs screen with the "Try it in Serpent" button above, then:

  1. Start a new scratch org

    From the Scratch Orgs list, open the New Scratch Org dialog.

  2. Choose a definition

    Pick the scratch org definition that sets the org's shape and features.

  3. Set the duration

    Enter how many days the org should live in the duration field before it expires.

  4. Create the org

    Submit the dialog and Serpent creates the scratch org from your Dev Hub.

What you need

Scratch orgs are created from a Dev Hub, so a connected Dev Hub is a prerequisite. Managing the Dev Hub is covered in Dev Hub Management, and reusing scratch orgs efficiently is covered in Scratch Org Pooling.