0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00
verdaccio/website/versioned_docs/version-6.x/install.md
2024-09-27 06:45:27 +02:00

4.9 KiB

id title
installation Installation

Verdaccio is a Node.js private and proxy registry. To install it, you need a few basic prerequisites.

Prerequisites

  1. Node.js v18 or higher.

  2. Your favorite Node Package Manager npm, pnpm or yarn (classic and berry).

We highly recommend to use the latest versions of Node Package Manager clients > npm@6.x | yarn@1.x | | yarn@2.x | pnpm@6.x. Don't support npm@5.x or older.

  1. A modern web browser to run the web interface. We actually support Chrome, Firefox, Edge.

Verdaccio will support latest Node.js version according the Node.js Release Working Group recomendations.

Are you still using Verdaccio 4?. Check the migration guide.

Quick Introduction

Learn the basics before getting started, how to install, where is the location of the configuration file and more.

Installing the CLI

Before using Verdaccio in production, please read and be aware of the best practices.

Verdaccio must be installed globally using either of the following methods:

Using npm

npm install -g verdaccio

or using yarn

yarn global add verdaccio

or using pnpm

pnpm install -g verdaccio

install verdaccio

Next major release (verdaccio 6 alpha)

Next major release is under development, byt can try it out already, either for testing purposes or helping to catch any possible bug, if you find something report it under the label 6.x bugs.

npm install -g verdaccio@7-next

or with the docker image

docker pull verdaccio/verdaccio:nightly-master

The docker image verdaccio/verdaccio:nightly-master is alinged with the latest commits in master branch, while the npmjs version has a longer release cycle. It is highly recommended don't use alpha versions for production.

Basic Usage

Once it has been installed, you only need to execute the CLI command:

$> verdaccio
warn --- config file  - /home/.config/verdaccio/config.yaml
warn --- http address - http://localhost:4873/ - verdaccio/5.0.0

For more information about the CLI, please read the cli section.

You can set the registry by using the following command.

npm set registry http://localhost:4873/

you can pass a --registry flag when needed.

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

define in your .npmrc a registry field.

registry=http://localhost:4873

Or a publishConfig in your package.json

{
  "publishConfig": {
    "registry": "http://localhost:4873"
  }
}

For alternative configurations, please read the Using a private registry section.

Create Your Own Private NPM Package Tutorial

If you'd like a broader explanation, don't miss the tutorial created by thedevlife on how to Create Your Own Private NPM Package using Verdaccio.

Docker Image

docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio

Verdaccio has an official docker image you can use, and in most cases, the default configuration is good enough. For more information about how to install the official image, read the docker section, furthermore you can learn more about combining Docker images in our docker-examples repository.

Helm Chart

$ helm repo add verdaccio https://charts.verdaccio.org
$ helm repo update
$ helm install verdaccio/verdaccio

Cloudron

Verdaccio is also available as a 1-click install on Cloudron

Install

Heroku with Docker

For easy deployment you could use Heroku, the free dyno tier allows you to test their platform using a Docker container, check this example.

https://github.com/juanpicado/verdaccio-heroku-example