
Andrew Hanna

Andrew Hanna

TL;DR: The Dev Hub is the Salesforce org that creates and manages your scratch orgs, unlocked packages and second-generation managed packages. You enable it in Setup on a production, Developer Edition or trial org, never a sandbox, and once it is on you cannot turn it off. For any team that ships, choosing the Dev Hub org is an architecture decision, not a checkbox.
The Dev Hub is the control org behind source-driven development. It is where your scratch orgs, packages and namespaces are managed, and every scratch org you create stays linked to it until it expires. No Dev Hub means no scratch orgs and no second-generation packaging.
Trailhead's Salesforce DX setup module puts it simply: a Dev Hub gives your team the ability to create and manage scratch orgs. What the setup guides rarely say is how much rides on which org you pick.
Most guides stop at "click Enable". Our view: for a team that ships, the Dev Hub belongs in your production org, or in your partner business org if you are an AppExchange partner. Three reasons:
A Developer Edition org or Trailhead Playground is the right place to learn. Trailhead itself recommends practising somewhere other than production. Just do not let the practice hub quietly become the team hub.
Salesforce publishes scratch org allocations by Dev Hub edition:
The daily figure counts successful creations in a rolling 24-hour window. The active
figure frees up when a scratch org is deleted or expires. A CI pipeline that spins up
a fresh scratch org per pull request exhausts a Developer Edition allocation in a
morning, which is why Salesforce recommends a production or business org for package
versions and CI jobs. Check your headroom with
sf org list limits --target-org DevHub and look for
ActiveScratchOrgs and DailyScratchOrgs.
sf org login web --set-default-dev-hub --alias DevHub.
sf org create scratch --definition-file config/project-scratch-def.json --alias
feature-x --duration-days 7.
Two details catch teams out. The Limited Access - Free license does not support Org Shape or Scratch Org Snapshots, which need a standard Salesforce user license. And scratch orgs expire after 7 days by default, with a 30-day maximum, so long-running feature work needs a plan to recreate them.
This is the gap the Dev Hub guides leave open. A fresh scratch org has your metadata and none of your data. Tests pass against empty orgs, then the same change fails in UAT because a Flow meets a record shape it has never seen. It is one of the hidden risks in your Salesforce deployment process, and a big part of why Salesforce deployments still break.
Serpent closes it at environment setup. Sandbox seeding loads sample or masked data as part of environment setup and release pipelines, so scratch orgs and refreshed sandboxes come back populated without a manual script run. PII masking obfuscates common personal fields during preview and migration, which keeps production-shaped data usable in lower environments while meeting GDPR and similar rules. The full steps are in our data migration and masking guide.
Most tools treat the Dev Hub as one more connected org. Gearset, for example, adds a Dev Hub as a normal org connection and creates scratch orgs from it, and AutoRABIT documents a scratch org creation flow in its ARM product. Creating the org is the easy part. The real question is what lands in it afterwards.
In Serpent, metadata and data move in the same release flow, and Migrate Data is an action in the visual automation flow builder. That matters beyond developers: admins who build declaratively get the same populated, disposable environments, which is the point we made in Salesforce DevOps is not just for developers.
Deploy data is listed on every plan of Serpent, including the free Essentials plan. Compare Serpent plans and seed your next scratch org with data instead of an empty shell.
Can I enable Dev Hub in a sandbox?
No. Dev Hub can only be enabled in a production, business, Developer Edition or trial org.
Can I disable Dev Hub after enabling it?
No. Enabling Dev Hub is permanent, so choose the org deliberately before you switch it on.
Is it safe to enable Dev Hub in production?
Salesforce states it does not cause performance or customer issues, and production gives you far higher scratch org limits than a Developer Edition org.
How long does a scratch org last?
Seven days by default. You can set a duration of up to 30 days when you create it.
Commitment free!