Newer Version Available

This content describes an older version of this product. View Latest

Enable Dev Hub in Your Org

Enable Dev Hub in your Salesforce org so you can create and manage scratch orgs, create and manage second-generation packages, and use Einstein features. Scratch orgs are disposable Salesforce orgs to support development and testing.
Available in: Salesforce Classic and Lightning Experience
Dev Hub available in: Developer, Enterprise, Performance, and Unlimited Editions
Scratch orgs available in: Developer, Enterprise, Group, and Professional Editions

It’s not necessary to enable Dev Hub if you plan to use Salesforce CLI with only sandboxes unless you plan to create second-generation (2GP) packages. The 2GP packages use a scratch org during the package generation process.

Note

Enabling Dev Hub in a production or business org is safe and doesn’t cause any performance or customer issues. Dev Hub comprises objects with permissions that allow admins to control the level of access available to a user and an org.

Consider these factors if you select a trial or Developer Edition org as your Dev Hub.

  • You can create up to six scratch orgs and package versions per day, with a maximum of three active scratch orgs.
  • Trial orgs expire on their expiration date.
  • Developer Edition orgs that are inactive for 365 days are deactivated.
  • You can define a namespace in a Developer Edition org that isn’t your Dev Hub, and you can enable Dev Hub in a Developer Edition org that doesn’t contain a namespace.
  • If you plan to create package versions or run continuous integration jobs, it’s better to use a production or business org as your Dev Hub because of higher scratch org and package version limits. Package versions are associated with your Dev Hub org. When a trial or Developer Edition org expires, you lose access to the package versions.

Partner trial orgs signed up from the partner community have different scratch org limits. See Scratch Org Allocations for Partners. Partners can create partner edition scratch orgs: Partner Developer, Partner Enterprise, Partner Group, and Partner Professional. This feature is available only if creating scratch orgs from a Dev Hub in a partner business org. See Supported Scratch Org Editions for Partners in the ISVforce Guide for details.

Note

The Dev Hub org instance determines where scratch orgs are created.

  • Scratch orgs created from a Dev Hub org in Government Cloud are created on a Government Cloud instance.
  • Scratch orgs created from a Dev Hub org in Public Cloud are created on a Public Cloud instance.

If you update the salesforcedx plug-in to the pre-release version, you see an error when pushing source between your local Salesforce DX project and scratch orgs: ERROR running force:source:push: The configured apiVersion 48.0 is not supported for this org. The max apiVersion is 47.0. To resolve the error for a specific project, set the apiVersion locally: sfdx force:config:set apiVersion=47.0. To resolve for all Salesforce DX projects, set the apiVersion globally: sfdx force:config:set apiVersion=47.0 -g. After you uninstall the pre-release version, update salesforcedx plug-in to the latest version and reset the global API version.

Note

To enable Dev Hub in an org:

  1. Log in as System Administrator to your Developer Edition, trial, or production org (for customers), or your business org (for ISVs).
  2. From Setup, enter Dev Hub in the Quick Find box and select Dev Hub.

    If you don't see Dev Hub in the Setup menu, make sure that your org is one of the supported editions.

  3. To enable Dev Hub, click Enable.
    After you enable Dev Hub, you can’t disable it.