function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SimmoSimmo 

Does a Dev Hub org have to be the production org?

When setting your Dev Hub using SFDX does it have to be your production org?

Or can you set a sandbox as your Dev Hub?
 
Ashaar Gautam 15Ashaar Gautam 15
Hi,

Sandboxes can NOT be a DevHub org as DevHub is not a feature in a sandbox. DevHub can be PRODUCTION or a Developer Edition Org.

Refer to this link for more details: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_enable_devhub.htm

Available in: Salesforce Classic and Lightning Experience
Dev Hub available in: Developer, Enterprise, Performance, and Unlimited Editions
AbhishekAbhishek (Salesforce Developers) 
Dev Hub can be enabled in Developer Edition Org's, but the scratch org limits are significantly lower than in paid Salesforce production Org's. In a Developer Edition org, the limits are just 3 active and 6 daily scratch orgs (https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs.htm), which might suffice for an individual developer who is not using continuous integration but can be stifling in a process that likes to use a lot of Org's. It's not feasible to share a Developer Edition Dev Hub across a team; each developer would need their own.

Production Org's, as described in the linked documentation, offer an order of magnitude more scratch Org's. To use Dev Hub in production, you can request special free (https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/dev_hub_license.htm), limited access licenses (https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/dev_hub_license.htm) (I wasn't sure if that's what you were alluding to in your question) to enable developers to authenticate and create scratch Org'sagainst Prod, without viewing CRM data.

Of course, some organizations may be unwilling for compliance or process reasons even to use those licenses, in which case you don't have much recourse other than a separate paid org or multiple Developer Editions.

I hope you find the above information is helpful. If it does, please mark as Best Answer to help others too.

Thanks.