2021-07-11 08:42:56 -05:00
---
id: installation
2022-12-25 12:48:18 -05:00
title: 'Installation'
2021-07-11 08:42:56 -05:00
---
2022-06-22 16:12:10 -05:00
Verdaccio is a Node.js private and proxy registry. To install it, you need a few basic prerequisites.
2021-07-11 08:42:56 -05:00
2021-07-27 14:52:49 -05:00
## Prerequisites {#prerequisites}
2021-07-11 08:42:56 -05:00
2022-10-10 01:00:09 -05:00
1. **Node.js** `v16` or higher.
2021-07-11 08:42:56 -05:00
2022-10-10 01:00:09 -05:00
2. Your favorite Node Package Manager `npm` , `pnpm` or `yarn` (classic and modern).
2021-07-11 08:42:56 -05:00
> 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.
3. 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](https://github.com/nodejs/Release) recomendations.
2021-07-27 14:52:49 -05:00
### Quick Introduction {#quick-introduction}
2021-07-11 08:42:56 -05:00
Learn the basics before getting started, how to install, where is the location of the configuration file and more.
2022-08-22 13:31:59 -05:00
< iframe width = "560" height = "515" src = "https://www.youtube.com/embed/hDIFKzmoCaA" title = "YouTube video player" frameborder = "0" allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen > < / iframe >
2021-07-11 08:42:56 -05:00
2021-07-27 14:52:49 -05:00
## Installing the CLI {#installing-the-cli}
2021-07-11 08:42:56 -05:00
> Before using Verdaccio in production, please read and be [aware of the best practices](best-practices.md).
`Verdaccio` must be installed globally using either of the following methods:
Using `npm`
```bash
2024-01-14 14:35:17 -05:00
npm install --location=global verdaccio@next-7
2021-07-11 08:42:56 -05:00
```
2022-12-25 12:48:18 -05:00
or using `yarn@1.x` _classic_ ,
2021-07-11 08:42:56 -05:00
```bash
2024-01-14 14:35:17 -05:00
yarn global add verdaccio@next-7
2021-07-11 08:42:56 -05:00
```
or using `pnpm`
```bash
2024-01-14 14:35:17 -05:00
pnpm install -g verdaccio@next-7
2021-07-11 08:42:56 -05:00
```
2021-07-27 14:52:49 -05:00
![install verdaccio ](/img/install_verdaccio.gif )
2021-07-11 08:42:56 -05:00
2021-07-27 14:52:49 -05:00
## Basic Usage {#basic-usage}
2021-07-11 08:42:56 -05:00
Once it has been installed, you only need to execute the CLI command:
```bash
$> verdaccio
2022-10-10 01:00:09 -05:00
info -=- local storage path /Users/user/.local/share/verdaccio/storage/.verdaccio-db.json
info --- using htpasswd file: /Users/user/.config/verdaccio/htpasswd
info --- http address http://localhost:4873/
info --- version: 6.0.0-6-next.48
info --- server started
2021-07-11 08:42:56 -05:00
```
For more information about the CLI, please [read the cli section ](cli.md ).
You can set the registry by using the following command.
```bash
npm set registry http://localhost:4873/
```
you can pass a `--registry` flag when needed.
```bash
npm install --registry http://localhost:4873
```
define in your `.npmrc` a `registry` field.
2021-07-27 14:52:49 -05:00
```bash title=".npmrc"
2021-07-11 08:42:56 -05:00
registry=http://localhost:4873
```
Or a `publishConfig` in your `package.json`
```json
{
"publishConfig": {
"registry": "http://localhost:4873"
}
}
```
2022-06-24 10:10:06 -05:00
For alternative configurations, please read the [Using a private registry ](cli-registry.md ) section.
2022-06-22 16:12:10 -05:00
2021-07-27 14:52:49 -05:00
## Create Your Own Private NPM Package Tutorial {#create-your-own-private-npm-package-tutorial}
2021-07-11 08:42:56 -05:00
If you'd like a broader explanation, don't miss the tutorial created by [thedevlife ](https://mybiolink.co/thedevlife ) on how to Create Your Own Private NPM Package using Verdaccio.
< iframe width = "560" height = "315" src = "https://www.youtube.com/embed/Co0RwdpEsag?enablejsapi=1" frameborder = "0" allow = "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen > < / iframe >
2021-07-27 14:52:49 -05:00
## Docker Image {#docker-image}
2021-07-11 08:42:56 -05:00
```bash
2022-10-10 01:00:09 -05:00
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:nightly-master
2021-07-11 08:42:56 -05:00
```
2022-06-22 16:12:10 -05:00
`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 ](docker.md ), furthermore you can learn more about combining Docker images in our [docker-examples ](https://github.com/verdaccio/verdaccio/tree/master/docker-examples ) repository.
## Helm Chart {#helm-chart}
```bash
$ helm repo add verdaccio https://charts.verdaccio.org
$ helm repo update
2022-10-10 01:00:09 -05:00
$ helm install registry --set image.tag=nightly-master verdaccio/verdaccio
2022-06-22 16:12:10 -05:00
```