Why use a private registry
Internal teams often maintain private npm packages for shared code like design systems, utility libraries, or proprietary API clients that shouldn’t be published publicly. With a private registry in Lovable, you can:- Install internal packages in Lovable projects without workarounds.
- Keep proprietary code private and secure.
- Reuse versioned internal libraries consistently across your workspace’s projects.
Common use cases
- Internal UI component libraries: install your organization’s design system as a private package and use it in Lovable projects.
- Shared utilities: use internal validation, formatting, or data-fetching packages across multiple projects.
- Proprietary integrations: install internal SDKs or API clients that can’t be published publicly.
Prerequisites
- A Lovable Enterprise plan
- Workspace owner or admin role
Set up the private registry
Setting up the private registry consists of two parts:- Enable the registry and create a service account key in Lovable workspace settings.
- Configure your code project by adding the
.npmrcfile, adding the service account key as annpm-key.jsonfile, and running authentication against the private registry using the service account key.
Part 1: Enable the registry
Provision the registry
Select Provision registry. Lovable sets up a private npm registry for your workspace.
Part 2: Configure your code project
Configure the .npmrc file
In your code project’s root directory, add the private registry details to the
.npmrc file.Add the service account key
Add the service account key you downloaded in Part 1 as an
npm-key.json file in your project.View published packages
Once packages are published to your private registry, you can view them in Settings → Build & deploy → Private registry. For each package, you can see the name, the latest published version, and when it was last updated.Use a private package
To install a private package in a Lovable project, prompt Lovable with the package name just as you would for any public npm package. For example:Limitations
- Only one private registry can be configured per workspace.
- Only workspace owners and admins can configure the registry. Editors and viewers cannot access registry settings.
FAQ
Who can see the registry configuration?
Who can see the registry configuration?
Only workspace owners and admins can view and manage the private registry settings. The authentication token is not shown after it is saved.
Do all projects in my workspace have access to the registry?
Do all projects in my workspace have access to the registry?
Yes. Once configured, the private registry is available to all projects in the workspace. There is no per-project configuration required.
Can I use scoped packages from my private registry?
Can I use scoped packages from my private registry?
Yes. Scoped packages (for example,
@my-org/package-name) are supported. Reference the package by its full scoped name when prompting Lovable.