---
description: Install private npm packages in Capawesome Cloud native builds. Configure auth tokens and registry settings for scoped or private dependencies.
title: Install Private npm Packages - Capawesome
image: https://capawesome.io/docs/assets/images/social/cloud/native-builds/guides/npm-private-registry.png
---

[ Skip to content](#install-private-npm-packages) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* [  Pedometer ](/docs/plugins/pedometer/)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* [  Superwall ](/docs/plugins/superwall/)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Overwrite Native Configurations ](/docs/cloud/native-builds/guides/native-configurations/)
* [  Auto-Increment Build Numbers ](/docs/cloud/native-builds/guides/auto-incrementing-build-numbers/)
* [  Override Java Version ](/docs/cloud/native-builds/guides/override-java-version/)
* [  Custom iOS Provisioning Profiles ](/docs/cloud/native-builds/guides/custom-ios-provisioning-profiles/)
* [  Install APK on Android Device ](/docs/cloud/native-builds/guides/install-apk-on-android-device/)
* [  Install IPA on iOS Device ](/docs/cloud/native-builds/guides/install-ipa-on-ios-device/)
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

# Install Private npm Packages[¶](#install-private-npm-packages "Permanent link")

You can use private npm packages within your [Capawesome Cloud](/) native builds by configuring a custom npm registry. This guide shows you how to set up authentication to access private packages from any npm registry provider.

## Add Environment Secret[¶](#add-environment-secret "Permanent link")

To access private npm packages, you need to configure an authentication token:

1. Obtain your authentication token from your npm registry provider
2. Add it to your Capawesome Cloud app as an environment secret with an appropriate name (e.g., `NPM_REGISTRY_TOKEN`) as described in [Environment secrets](/docs/cloud/native-builds/environments/#secrets)
Keep your tokens secure 

Never commit authentication tokens directly to your repository. Always use environment secrets to store sensitive information like authentication tokens.

## Configure npm Registry[¶](#configure-npm-registry "Permanent link")

Create a new file named `.npmrc` in the root of your project with the following configuration:

`[](#%5F%5Fcodelineno-0-1)@your-scope:registry=https://your-registry.example.com
[](#%5F%5Fcodelineno-0-2)//your-registry.example.com/:_authToken=${YOUR_NPM_REGISTRY_TOKEN}
`

Replace the following placeholders:

* `@your-scope`: Your package scope (e.g., `@mycompany`)
* `https://your-registry.example.com`: Your npm registry URL
* `${YOUR_NPM_REGISTRY_TOKEN}`: The name of your environment secret containing the authentication token

This configuration tells npm to use your custom registry for packages under your scope and authenticate using the environment secret.

Capawesome Insiders 

If you're looking to install private Capawesome Insiders npm packages, refer to the [Integrate Capawesome Insiders with Capawesome Cloud](/docs/insiders/integrations/capawesome-cloud/) guide for specific setup instructions.

## Manage Multiple Environments[¶](#manage-multiple-environments "Permanent link")

If your local development environment stops working with the new `.npmrc` file, you can create a separate configuration file specifically for Capawesome Cloud:

1. Create a new file named `.npmrc.capawesome` in the root of your project with the registry configuration
2. Navigate to your **Capawesome Cloud app > Settings > Environment variables**
3. Add a new environment variable named `NPM_CONFIG_USERCONFIG`
4. Set its value to `/tmp/capawesome/repo/.npmrc.capawesome`
Custom file location 

If your `.npmrc.capawesome` file is not in your project's root directory, adjust the path in the `NPM_CONFIG_USERCONFIG` environment variable accordingly.

This approach allows you to maintain separate npm configurations for local development and Capawesome Cloud builds.

May 7, 2026 

 Back to top 