Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To host, publish and manage private npm packages with Verdaccio, run a self-hosted npm-compatible registry, authenticate users, publish scoped packages such as @acme/string-utils, and enforce access rules that prevent private packages from falling through to npmjs.com. Verdaccio also proxies and caches approved public packages, but production use requires HTTPS, persistent storage, backups, and careful configuration.

Verdaccio is a strong fit when a Node.js team wants control over registry location and an npm-compatible workflow without operating a full enterprise artifact platform. Verdaccio is open-source software, but “free” means no software license fee—not zero cost for hosting, storage, TLS, backups, monitoring, upgrades, or support.

Key takeaways

  • Current Verdaccio installation documentation requires Node.js 18 or higher, and the local registry normally listens on port 4873.
  • Verdaccio can host private packages, proxy packages from npmjs.com or another npm-compatible registry, and cache remote package content.
  • Verdaccio’s default configuration permits broad reads but requires authentication for publishing and unpublishing; confidential registries should use explicit authenticated access rules.
  • A private scope such as @acme/* should normally have no public npm proxy, which reduces dependency-confusion risk.
  • Docker and Kubernetes deployments need persistent storage; an ephemeral container or pod can lose locally published packages and cached content after recreation.
  • Verdaccio is lightweight and portable, while npm private packages, GitHub Packages, AWS CodeArtifact, Cloudsmith, and JFrog Artifactory reduce some operational work or add broader platform features.

What is Verdaccio and what problem does it solve?

Verdaccio is a lightweight, self-hosted npm-compatible registry and proxy. A team can publish internal packages to Verdaccio, install those packages with ordinary npm commands, and use Verdaccio as a controlled gateway to public or private upstream registries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verdaccio solves four related problems:

  • Private package hosting: internal libraries remain in a registry controlled by the team rather than being published to npmjs.com.
  • Public npm proxying: Verdaccio can request packages from npmjs.com or another npm-compatible registry when a package is not already local.
  • Caching: remote package content can be retained locally, reducing repeated upstream downloads and providing limited resilience when an upstream registry is temporarily unavailable.
  • One npm-compatible endpoint: developers and CI can use one registry URL for internal packages and approved public dependencies.

The official Verdaccio overview describes the project as a private npm proxy registry built with Node.js. Verdaccio can run as a laptop-local registry for testing, a shared internal service, a pull-through cache, or a registry inside Docker or Kubernetes.

Is Verdaccio the right private npm registry?

Verdaccio is the right choice when self-hosting, network control, npm compatibility, and a small operational footprint matter more than managed availability and enterprise governance.

Requirement Verdaccio fit Important trade-off
Local testing of publish and install workflows Excellent Simple to run, but local data is not a team backup.
Private npm packages inside a private network Strong The team owns HTTPS, authentication, storage, backups, and upgrades.
Public npm pull-through cache Strong Cache behavior and upstream availability still depend on configuration and npmjs.com.
Small or medium Node.js team Often appropriate Operations grow as availability, scale, and governance requirements grow.
SSO, multi-region replication, universal artifacts, policy enforcement, or an SLA Usually a weaker fit A managed or enterprise artifact registry may be more appropriate.

Choose npm private packages when npm-hosted infrastructure is preferable and the team does not need self-hosting. Choose GitHub Packages when repositories, Actions, and organization permissions already center on GitHub. Choose AWS CodeArtifact when AWS IAM and managed operations are priorities. Choose Cloudsmith or JFrog Artifactory when the team needs a managed, multi-format artifact platform.

What do you need before installing Verdaccio?

The current official installation documentation requires Node.js 18 or higher for the CLI installation. The requirement applies to the current documentation and should be checked again against the specific Verdaccio release selected for publication and deployment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Node.js 18 or newer for the current CLI documentation.
  • npm, pnpm, or Yarn.
  • A modern browser if you want to use Verdaccio’s web interface.
  • Persistent storage for any shared or production registry.
  • A DNS name, HTTPS termination, and a secret-management method for a network-accessible deployment.

The official installation documentation covers installation methods and the official Docker image. Do not hard-code the first-run configuration or storage paths from a tutorial: the exact paths vary by operating system and installation method, so use the paths printed in the Verdaccio startup log.

How do you install and start Verdaccio locally?

The shortest local setup is to install the global CLI and start the registry. The default local address is http://localhost:4873/.

npm install --global verdaccio
verdaccio

Yarn and pnpm alternatives are:

yarn global add verdaccio
pnpm install --global verdaccio

On its first run, Verdaccio creates a configuration file, an htpasswd authentication file for default users, and a storage directory. The startup log identifies the locations used by the running instance.

For a one-off npm test, keep the normal npm registry unchanged and specify Verdaccio explicitly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm install some-package --registry http://localhost:4873
npm publish --registry http://localhost:4873

To make Verdaccio the default registry for the current npm configuration, use:

npm config set registry http://localhost:4873/

Alternatively, add this to an .npmrc file:

registry=http://localhost:4873/

Global registry replacement is convenient for a local experiment, but scope-specific configuration is safer for a team because public packages can continue using npmjs.com while private packages use Verdaccio.

How do you create and publish a private package?

Use a private organization scope such as @acme and protect the package’s publication registry with publishConfig. A minimal package might contain:

{
  "name": "@acme/string-utils",
  "version": "1.0.0",
  "description": "Internal string utilities",
  "main": "dist/index.js",
  "files": ["dist"],
  "publishConfig": {
    "registry": "http://localhost:4873"
  }
}

The package name and version identify the published artifact. Publishing a new artifact normally requires a new version. The publishConfig.registry value helps prevent an accidental publication to npmjs.com, but the effective npm configuration and CI configuration must still be checked.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inspect the contents before publication:

npm pack --dry-run
npm publish --dry-run

The precise output and behavior of npm publish --dry-run can vary with the npm CLI version, so test the command with the npm version used by the team.

Create or log in to a Verdaccio user using the command shown in the current Verdaccio documentation:

npm adduser --registry http://localhost:4873

Depending on the npm CLI version and Verdaccio configuration, npm login may also work. Verify identity before publishing:

npm whoami --registry=http://localhost:4873

Publish and then retrieve the package metadata:

npm publish --registry http://localhost:4873
npm view @acme/string-utils --registry http://localhost:4873

Install the package from Verdaccio:

npm install @acme/string-utils --registry http://localhost:4873

The Verdaccio authentication documentation explains the login flow and authentication plugins. npm stores an authentication token in npm configuration after successful login. A typical token entry resembles the following, but the real token must never be committed:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
//localhost:4873/:_authToken="secretVerdaccioToken"

How should Verdaccio access rules protect private packages?

The packages section controls who can read, publish, and unpublish packages, and whether Verdaccio should query an uplink when a package is not local. Authentication proves who a user is; the matching package rule determines what that user may do.

Verdaccio’s default configuration allows unauthenticated reads but requires authentication for publishing and unpublishing. That default is convenient for local development, but it is too broad for a confidential production registry.

A safer starting configuration for a private @acme scope and public npm proxying is:

packages:
  '@acme/*':
    access: $authenticated
    publish: $authenticated
    unpublish: $authenticated

  '**':
    access: $all
    publish: $authenticated
    unpublish: $authenticated
    proxy: npmjs
Setting Meaning
access Who may download package metadata and artifacts.
publish Who may publish new package versions.
unpublish Who may remove packages or versions, subject to registry behavior and permissions.
proxy The uplink Verdaccio uses when a package is not available locally.
$all Everyone, including unauthenticated users.
$authenticated Users who have authenticated.

Notice that the @acme/* rule has no proxy entry. A missing private package should not silently fall through to npmjs.com. The broad ** rule can proxy public packages, but the more specific private-scope rule must be tested rather than assumed.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Current Verdaccio documentation recommends access, publish, unpublish, and proxy; older allow_* names are deprecated. Read the package access documentation and test rule matching with the exact Verdaccio release in use.

Package patterns use minimatch-style matching. Keep patterns unique and test ordering and specificity, particularly when combining @acme/* and **.

Verify a private package with an authorized account:

npm view @acme/string-utils --registry http://localhost:4873
npm install @acme/string-utils --registry http://localhost:4873

Repeat the test with an unauthorized account. The unauthorized account should receive a denied response rather than a package served from an upstream registry.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How does Verdaccio proxy and cache public npm packages?

Verdaccio uses an uplink to retrieve packages that are not already stored locally. A basic npmjs.com uplink is:

uplinks:
  npmjs:
    url: https://registry.npmjs.org/

The matching public-package rule can use that uplink:

packages:
  '**':
    access: $all
    publish: $authenticated
    unpublish: $authenticated
    proxy: npmjs

With the local registry selected, this command can cause Verdaccio to request lodash from npmjs.com and retain the result locally, depending on the cache configuration:

npm install lodash --registry http://localhost:4873

Proxy caching reduces repeated downloads and can provide limited resilience during an upstream outage. Caching is not a substitute for package backups, upstream trust decisions, or a disaster-recovery plan.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do multiple Verdaccio uplinks work?

Multiple uplinks route different package patterns to different npm-compatible registries:

uplinks:
  npmjs:
    url: https://registry.npmjs.org/

  company:
    url: https://packages.example.com/npm/

packages:
  '@acme/*':
    access: $authenticated
    publish: $authenticated
    proxy: company

  '**':
    access: $all
    publish: $authenticated
    proxy: npmjs

Use explicit scope-based routing where possible. Multiple uplinks can increase lookup latency because Verdaccio may contact configured upstreams, and uplinks are remote sources—not replicas, backups, or automatic multi-region high availability.

If a private upstream requires a bearer token, keep the token outside the YAML file:

uplinks:
  private:
    url: https://packages.example.com/npm/
    auth:
      type: bearer
      token_env: PRIVATE_NPM_TOKEN

Inject PRIVATE_NPM_TOKEN through the deployment’s secret mechanism. The Verdaccio uplink documentation supports environment-backed tokens and discourages inline private tokens.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How should npm be configured for private and public scopes?

For a team that wants npmjs.com for public packages and Verdaccio for private packages, use scope-specific registry selection:

registry=https://registry.npmjs.org/
@acme:registry=https://registry.example.com/

This arrangement avoids routing every npm request through the internal registry when the internal registry is not intended to proxy all public dependencies. A package can also pin its publication destination:

{
  "publishConfig": {
    "registry": "https://registry.example.com"
  }
}

Use explicit commands for one-off tests:

npm view @acme/string-utils 
  --registry=https://registry.example.com

npm install @acme/string-utils 
  --registry=https://registry.example.com

npm configuration can come from project, user, global, and environment settings. Diagnose the effective configuration rather than guessing:

npm config list
npm config get registry

A package’s installation registry does not have to be identical to its publication registry. Scope-specific .npmrc rules and publishConfig can separate those workflows, but the separation must be documented and tested in developer machines and CI.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How should authentication and CI credentials be separated?

Use different credentials for different jobs. A developer login token, a CI publishing token, a read-only installation token, and a token used to access a private upstream should not automatically have the same permissions.

A CI project-level .npmrc can use an environment variable rather than embedding a token:

registry=https://registry.example.com
//registry.example.com/:_authToken=${NPM_TOKEN}
always-auth=true

Provide NPM_TOKEN through the CI platform’s encrypted secret mechanism. Do not commit a real token, print the token in logs, or put a bearer token directly in config.yaml.

A minimal publishing sequence is:

npm ci
npm test
npm publish --registry https://registry.example.com

A build that only installs dependencies should receive a read-only credential. A release job that publishes packages needs publication permission. Token rotation, revocation, and audit procedures should be part of the registry’s operational policy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What storage does Verdaccio use, and why is persistence essential?

The standard configuration includes storage: ./storage. The storage directory contains locally hosted packages and cached content. Verdaccio also maintains metadata and, with the default storage approach, a small database file. The official configuration documentation notes that the default storage behavior stores only the latest README markdown for each package.

Persistent storage is mandatory for a shared or production registry. An ephemeral Docker volume or Kubernetes pod filesystem can delete internal packages and cached public packages when the container or pod is recreated.

  • Back up package storage.
  • Back up the authentication database or htpasswd file.
  • Document the configuration and secret references needed for restoration.
  • Restore backups to a separate Verdaccio instance and verify package installation and authentication.
  • Test recovery before declaring the registry durable.

Storage plugins for services such as Amazon S3 and Google Cloud Storage exist in the ecosystem. Treat those plugins as options requiring compatibility, maintenance, locking, performance, and recovery evaluation—not as automatically endorsed production components. Running multiple replicas against an arbitrary shared filesystem is not, by itself, a safe highly available architecture.

How do you deploy Verdaccio with Docker?

The official Docker image is verdaccio/verdaccio. The quick-start command is useful for a disposable test:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker run -it --rm 
  --name verdaccio 
  -p 4873:4873 
  verdaccio/verdaccio

For useful persistence, mount configuration and storage volumes:

docker run -d 
  --name verdaccio 
  -p 4873:4873 
  -v verdaccio-storage:/verdaccio/storage 
  -v verdaccio-conf:/verdaccio/conf 
  verdaccio/verdaccio

Check the exact container paths against the selected image version and pin an image tag for production rather than silently tracking an unpinned latest tag. Image pinning makes upgrades deliberate and rollback more predictable.

A production Docker deployment should also place Verdaccio behind a reverse proxy or gateway that provides HTTPS, access logging, rate limiting, and network controls. The Docker image does not constitute a backup, an SLA, or a high-availability design. Read the official image documentation alongside the release-specific Verdaccio installation documentation.

How do you deploy Verdaccio on Kubernetes?

The official documentation shows this Helm starting point:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
helm repo add verdaccio https://charts.verdaccio.org
helm repo update
helm install registry --set image.tag=6 verdaccio/verdaccio

A production Kubernetes deployment needs more than the installation command. Plan and test the following:

  • A PersistentVolumeClaim for package storage and configuration data.
  • Ingress with TLS and a DNS name.
  • Kubernetes Secrets for npm credentials and private-uplink tokens.
  • Readiness and liveness probes that reflect actual registry health.
  • CPU and memory requests and limits.
  • Network policies limiting who can reach the registry and which upstreams it can contact.
  • Backup and restore procedures for storage and authentication data.
  • Chart and image upgrade testing, with a rollback plan.
  • A storage backend whose locking and concurrency behavior matches the intended replica and traffic model.

A Helm installation is a deployment mechanism, not proof of high availability. Replicas, load balancing, shared storage, and recovery behavior must be tested together.

What should a production Verdaccio hardening checklist include?

Before exposing Verdaccio beyond localhost, apply these controls:

  • Use HTTPS: protect credentials and package contents whenever clients connect over a network.
  • Restrict reads: replace broad anonymous access with $authenticated for confidential package scopes.
  • Disable anonymous publishing: publication should normally require authentication.
  • Block private-scope fallback: omit proxy from private scope rules unless an explicitly trusted private uplink is intended.
  • Protect tokens: use CI secrets and environment-backed uplink tokens; never commit real credentials.
  • Persist data: use durable storage and test restoration.
  • Monitor operations: collect logs, authentication failures, storage health, upstream errors, and capacity signals without logging secret values.
  • Control the network: use a reverse proxy or ingress, firewall rules, rate limiting, and appropriate network policies.
  • Prevent dependency confusion: reserve an internal scope such as @acme and ensure that private scope misses do not query npmjs.com.
  • Plan upgrades: test the Verdaccio version, npm client versions, configuration syntax, plugins, and storage behavior together.

Authentication and authorization remain separate controls: a successful login does not grant access to every package, and an unauthenticated user may still read packages if a matching rule uses $all.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How do you troubleshoot common Verdaccio failures?

Symptom Likely causes Checks and recovery
Publish succeeds but install returns 404 Wrong registry, missing scope mapping, unauthenticated user, nonmatching rule, different Verdaccio instance, or lost storage. Run npm config get registry, npm config list, and npm view @acme/string-utils --registry=http://localhost:4873. Verify storage and the @acme/* rule.
npm publish returns 401 or 403 No login, token saved for another host or port, restrictive publish rule, broken proxy authorization header, or missing CI secret. Run npm whoami --registry=http://localhost:4873; inspect effective npm configuration without exposing token values.
Private packages are fetched from npmjs.com A broad ** rule with proxy: npmjs is handling the request. Add a more specific private-scope rule without a public proxy and test a missing package with an unauthorized user.
Packages disappear after redeployment Container or pod storage is ephemeral. Add a Docker volume or Kubernetes PersistentVolumeClaim and test restore procedures.
Private upstream authentication fails Invalid token, wrong bearer configuration, or secret not injected into the process. Use token_env, inject the environment variable through deployment secrets, and inspect logs without printing the token.
Package is served from the wrong registry Global, project, user, or environment npm settings conflict; scope mapping or publishConfig is wrong. Run npm config list and npm config get registry; check scoped .npmrc rules and package metadata.
Large request fails with “request entity too large” The configured JSON body limit is too small. Review the configuration’s body-size setting. The documented default maximum JSON body size is 10 MB; that setting is not necessarily a universal package-tarball size limit.

The configuration documentation explains the JSON body-size setting and other server options. Change limits deliberately and understand whether the failing request is JSON metadata or a package tarball upload.

How does Verdaccio compare with hosted alternatives?

Verdaccio minimizes software licensing cost but transfers operational responsibility to the team. Hosted services charge for infrastructure or usage while reducing some of the work involved in availability, upgrades, identity, and support.

Option Hosting responsibility npm and proxy fit Broader capabilities Best fit
Verdaccio Team operates hosting, TLS, storage, backups, upgrades, and monitoring. Self-hosted npm-compatible registry, private packages, and configurable uplinks. Focused npm registry; broader governance and multi-format features require additional architecture or tools. Teams needing network control, portability, or a lightweight internal registry.
npm private packages npm operates the hosted registry. Native npm private user- and organization-scoped packages. npm account plans, policies, and hosted-service integration. Teams that want npm-hosted infrastructure.
GitHub Packages GitHub operates the service. Native package tooling with GitHub-centered access. Repository, Actions, organization permissions, and plan-based private storage and transfer allowances. GitHub-centered organizations.
AWS CodeArtifact AWS operates the managed repository. Private package repository with AWS authorization and upstream connections. IAM integration and usage-based billing for storage, requests, and transfer. AWS-standardized organizations.
Cloudsmith Cloudsmith operates a managed multi-format registry. Npm registry support with hosted operations. Multi-format packages, integrations, service accounts, and policy features. Teams wanting managed scale and transparent public pricing.
JFrog Artifactory Cloud-hosted or self-managed, depending on plan. Npm support plus remote-registry proxying. Universal artifacts, governance, replication, enterprise support, and broad DevOps integration. Organizations with enterprise artifact requirements.

For official product details, compare npm private packages, GitHub Packages, AWS CodeArtifact, Cloudsmith’s npm registry, and JFrog’s pricing and product plans.

Pricing is volatile. Research observed Cloudsmith’s public page listing Core at $0 per month, Pro at $149 per month, and custom Ultra and Enterprise plans; the displayed allowances included 500 MB of artifact data and 1 GB of package delivery for Core, and 5 GB of artifact data and 25 GB of package delivery for Pro, with additional data displayed at $1.50 per GB. Research also observed JFrog’s page displaying SaaS Pro at $150 per month, Enterprise X from $950 per month, and self-managed Pro X from $27,000 per year. Recheck currency, quotas, usage charges, geography, and plan terms before publication or purchase.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

AWS CodeArtifact uses usage-based billing for artifact storage, requests, and data transfer, while GitHub Packages provides allowances tied to the GitHub account plan. The exact current npm plan price and included features should be taken from the live npm pricing page at the time of purchase.

What is the practical deployment path?

  1. Install the current Verdaccio release using Node.js 18 or newer, or choose the official Docker image or Helm chart.
  2. Run a local instance and publish a scoped test package.
  3. Choose a stable DNS name and put HTTPS in front of any network-accessible instance.
  4. Configure authenticated access for private scopes and prevent those scopes from using npmjs.com as an unintended fallback.
  5. Configure a public npm uplink only for packages that the team intends to proxy.
  6. Move storage to a persistent disk or an evaluated storage plugin.
  7. Create separate developer, read-only CI, publishing CI, and private-uplink credentials.
  8. Back up package storage and authentication data, then perform a test restore.
  9. Test registry selection, authentication, authorization, publishing, installation, upstream failure, and redeployment before calling the service production-ready.

Frequently Asked Questions

Does setting “private”: true in package.json protect a Verdaccio package?

No. The package.json private flag is not a substitute for Verdaccio access control. Verdaccio package rules and the authentication plugin determine who can read, publish, and unpublish a package; configure a private scope such as @acme/* with authenticated access.

Can Verdaccio replace npmjs.com for public dependencies?

Yes. Verdaccio can proxy public packages from npmjs.com through an uplink and cache remote content according to its configuration. A scope-specific setup that keeps public packages on npmjs.com and routes only the internal scope to Verdaccio is often safer when broad proxying is unnecessary.

Does Verdaccio provide high availability automatically?

No. A basic Verdaccio, Docker, or Helm installation does not automatically provide high availability. High availability requires tested persistent storage, replica and load-balancer behavior, backups, monitoring, and recovery procedures.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why did packages disappear after a Verdaccio restart?

Packages usually disappear after a restart because the registry used ephemeral storage. Mount a persistent Docker volume or Kubernetes PersistentVolumeClaim for Verdaccio storage, back up the package and authentication data, and verify restoration on a separate instance.

The Bottom Line

Verdaccio is an effective way to host, publish and manage private npm packages when a team wants a lightweight, npm-compatible registry under its own control. Start with a scoped package, authenticated access, no public fallback for private scopes, HTTPS, and persistent storage. Move to npm, GitHub Packages, AWS CodeArtifact, Cloudsmith, or JFrog when managed operations, enterprise identity, multi-format support, governance, replication, or an SLA outweigh Verdaccio’s self-hosting advantages.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of December 5, 2026 12:35 am GMT.