Is it possible to turn on Dev hub in a developer org?. I want to make an unlocked package to install in a production org with several packages where my package should communicate to another package, for example update a field from a package. The easiest way seems to have a developer org created from production with all packages and develop my package from there, so is this possible to do?

On the other hand if it possible this would mean that if the developer sandbox gets refreshed I would lose metadata.

I have searched but its not clear to me if turning on Dev hub is possible in a developer org or maybe I am missing something.

I have read several articles to do this in a Developers edition org, but this would mean that I can not install all the packages to develop against in the DE org if I am not misunderstood. Please clarify in this case which would be the easiest and safest way to go.

Is the term developer org a sandbox from a production org or is this a Developer edition.

Thanks in advance.

1 Answer 1


We need to be clear about terms here.

A Developer sandbox is associated with a production org and cannot be a Dev Hub, although your production org itself can be a Dev Hub (and comes with significantly higher limits, for most editions, than a Developer Edition org).

A Developer Edition org is an independent production org (signed up from developer.salesforce.com) and is not associated with your business's production org. A Developer Edition org can be a Dev Hub and comes with limits of 3 active and 6 daily scratch orgs.

If you want to build an Unlocked Package that interacts with managed packages (another key term and distinction) that you have installed in your production org, you'll need to either install those packages in scratch orgs you use to build your Unlocked Package, or build and capture the metadata for your Unlocked Package in a sandbox and create an Org Dependent Unlocked Package that can be installed in your production org.

The latter sounds mostly likely to be the approach you want. However, regardless of which approach you take, the location of your Dev Hub doesn't actually matter other than in the scratch org limit that is applied. Unlocked packages are uploaded from metadata, not from an org. Your choice is about where you do the creation of that metadata - a scratch org, for a regular Unlocked Package, or potentially a sandbox, for an org-dependent Unlocked Package that depends on your production org's shape and configuration.

  • Thanks so far. Please clarify: 1. Is there a difference to install packages in a Developer edition with Dev hub turned on (is this even possible?) or installing packages in a scratch org from the Developer edition Dev hub. My underlying question here is if I am only pushing metadata from a scratch org to a developer edition how can I test the Unlocked package against the installed packages from the scratch orgs. 2. If I would choose for the latter option, how would I capture the metadata from the sandbox to the independent DE org do I have to use ANT or is this possible with SFDX?
    – Thomas
    Dec 29, 2020 at 23:25
  • 1
    I'm having a hard time following what you're asking, but I'll try to answer at the principle level. The org in which you do development does not need to be a Dev Hub (in most cases, it shouldn't be). The Dev Hub has nothing to do with the set of packages installed in an org.
    – David Reed
    Dec 30, 2020 at 0:35
  • 1
    If your Unlocked Package depends on metadata from other managed packages you are using, you have to have those packages installed in order to build the Unlocked Package, unless you are building an org-dependent package. If you just want to test with those packages present, build your Unlocked Package first and install it in a sandbox to test.
    – David Reed
    Dec 30, 2020 at 0:36
  • 1
    Second-generation packages are built from metadata, not from an org. There would be no reason to move packagable metadata from a sandbox to a DE org. You can, and in most cases should, capture metadata from a scratch org or a source-tracked Developer sandbox using SFDX.
    – David Reed
    Dec 30, 2020 at 0:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .