Create Developer Hub and Namespace Orgs
Link a Developer Hub org to a namespace org to use the Salesforce Developer Experience to develop a second-generation package.
Use this Dev Hub org to manage scratch orgs and build managed packages for distribution.
- Create a Developer Edition org.
- Turn on Dev Hub features. From Setup, enter
Dev Hubin the Quick Find box and select Dev Hub. Then, click Enable. After you enable Dev Hub, you can’t disable it. - Select Unlocked Packages and Second-Generation Managed Packages.
Create a separate org just to manage the namespace. If you’re creating a managed package for distribution, a namespace is required.
- Create a Developer Edition org.
- Create a namespace.
- In the Dev Hub org, use Namespace Registry to register the namespace that you created. See Link a Namespace to a Dev Hub Org for more information.
- In the
sfdx-project.jsonfile, use the namespace attribute to specify your namespace.