1"use strict";(globalThis.webpackChunk_verdaccio_website=globalThis.webpackChunk_verdaccio_website||[]).push([[2777],{20076:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>t,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"installation","title":"Installation","description":"Verdaccio is a Node.js private and proxy registry. To install it, you need a few basic prerequisites.","source":"@site/docs/install.md","sourceDirName":".","slug":"/installation","permalink":"/docs/installation","draft":false,"unlisted":false,"editUrl":"https://github.com/verdaccio/website/edit/master/website/docs/install.md","tags":[],"version":"current","lastUpdatedBy":"verdacciopack","lastUpdatedAt":1789720860000,"frontMatter":{"id":"installation","title":"Installation"},"sidebar":"docs","next":{"title":"What is Verdaccio?","permalink":"/docs/what-is-verdaccio"}}');var i=r(8265),a=r(92233);const c={id:"installation",title:"Installation"},t=void 0,o={},l=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Quick Introduction",id:"quick-introduction",level:3},{value:"Installing the CLI",id:"installing-the-cli",level:2},{value:"Basic Usage",id:"basic-usage",level:2},{value:"Create Your Own Private NPM Package Tutorial",id:"create-your-own-private-npm-package-tutorial",level:2},{value:"Docker Image",id:"docker-image",level:2},{value:"Helm Chart",id:"helm-chart",level:2}];function d(e){const n={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"Verdaccio is a Node.js private and proxy registry. To install it, you need a few basic prerequisites."}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Node.js"}),", matching the version of Verdaccio you install:"]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Verdaccio"}),(0,i.jsx)(n.th,{children:"Node.js"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"6.x"})," (current)"]}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:">= 22"})})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"7.x"})," and later"]}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:">= 24"})})]})]})]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Your favorite Node Package Manager ",(0,i.jsx)(n.code,{children:"npm"}),", ",(0,i.jsx)(n.code,{children:"pnpm"})," or ",(0,i.jsx)(n.code,{children:"yarn"})," (classic and modern)."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsxs)(n.strong,{children:[(0,i.jsx)(n.code,{children:"npm@10"})," or newer is recommended."]})," Every supported Verdaccio already\nrequires a Node.js release that bundles npm 10 or 11, so anything older is\nneither tested nor supported. Some features ask for more: ",(0,i.jsx)(n.code,{children:"npm stage"})," needs\n",(0,i.jsx)(n.code,{children:"[email protected]"}),", and the yarn plugins need ",(0,i.jsx)(n.code,{children:"yarn@4"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.ol,{start:"3",children:["\n",(0,i.jsxs)(n.li,{children:["A modern web browser to run the web interface. We actually support ",(0,i.jsx)(n.code,{children:"Chrome, Firefox, Edge"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["Verdaccio will support latest Node.js version according the ",(0,i.jsx)(n.a,{href:"https://github.com/nodejs/Release",children:"Node.js Release Working Group"})," recomendations."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"quick-introduction",children:"Quick Introduction"}),"\n",(0,i.jsx)(n.p,{children:"Learn the basics before getting started, how to install, where is the location of the configuration file and more."}),"\n",(0,i.jsx)("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:!0}),"\n",(0,i.jsx)(n.h2,{id:"installing-the-cli",children:"Installing the CLI"}),"\n",(0,i.jsxs)(n.blockquote,{children:["\n",(0,i.jsxs)(n.p,{children:["Before using Verdaccio in production, please read and be ",(0,i.jsx)(n.a,{href:"/docs/best",children:"aware of the best practices"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Verdaccio"})," must be installed globally using either of the following methods:"]}),"\n",(0,i.jsxs)(n.p,{children:["Using ",(0,i.jsx)(n.code,{children:"npm"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install -g verdaccio\n"})}),"\n",(0,i.jsxs)(n.p,{children:["or using ",(0,i.jsx)(n.code,{children:"[email protected]"})," ",(0,i.jsx)(n.em,{children:"classic"}),","]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"yarn global add verdaccio\n"})}),"\n",(0,i.jsxs)(n.p,{children:["or using ",(0,i.jsx)(n.code,{children:"pnpm"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"pnpm install -g verdaccio\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"install verdaccio",src:r(64726).A+"",width:"1053",height:"440"})}),"\n",(0,i.jsx)(n.h2,{id:"basic-usage",children:"Basic Usage"}),"\n",(0,i.jsx)(n.p,{children:"Once it has been installed, you only need to execute the CLI command:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"$> verdaccio\n info -=- local storage path /Users/user/.local/share/verdaccio/storage/.verdaccio-db.json\n info --- using htpasswd file: /Users/user/.config/verdaccio/htpasswd\n info --- http address http://localhost:4873/\n info --- version: 6.0.0\n info ---
1server started\n"})}),"\n",(0,i.jsxs)(n.p,{children:["For more information about the CLI, please ",(0,i.jsx)(n.a,{href:"/docs/cli",children:"read the cli section"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"You can set the registry by using the following command."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm set registry http://localhost:4873/\n"})}),"\n",(0,i.jsxs)(n.p,{children:["you can pass a ",(0,i.jsx)(n.code,{children:"--registry"})," flag when needed."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install --registry http://localhost:4873\n"})}),"\n",(0,i.jsxs)(n.p,{children:["define in your ",(0,i.jsx)(n.code,{children:".npmrc"})," a ",(0,i.jsx)(n.code,{children:"registry"})," field."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:'title=".npmrc"',children:"registry=http://localhost:4873\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Or a ",(0,i.jsx)(n.code,{children:"publishConfig"})," in your ",(0,i.jsx)(n.code,{children:"package.json"})]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "publishConfig": {\n "registry": "http://localhost:4873"\n }\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["For alternative configurations, please read the ",(0,i.jsx)(n.a,{href:"/docs/cli-registry",children:"Using a private registry"})," section."]}),"\n",(0,i.jsx)(n.h2,{id:"create-your-own-private-npm-package-tutorial",children:"Create Your Own Private NPM Package Tutorial"}),"\n",(0,i.jsxs)(n.p,{children:["If you'd like a broader explanation, don't miss the tutorial created by ",(0,i.jsx)(n.a,{href:"https://linktr.ee/thedevlife",children:"thedevlife"})," on how to Create Your Own Private NPM Package using Verdaccio."]}),"\n",(0,i.jsx)("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:!0}),"\n",(0,i.jsx)(n.h2,{id:"docker-image",children:"Docker Image"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"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, ",(0,i.jsx)(n.a,{href:"/docs/docker",children:"read the docker section"}),", furthermore you can learn more about combining Docker images in our ",(0,i.jsx)(n.a,{href:"https://github.com/verdaccio/verdaccio/tree/master/docker-examples",children:"docker-examples"})," repository."]}),"\n",(0,i.jsx)(n.h2,{id:"helm-chart",children:"Helm Chart"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"$ helm repo add verdaccio https://charts.verdaccio.org\n$ helm repo update\n$ helm install registry --set image.tag=6 verdaccio/verdaccio\n"})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},64726:(e,n,r)=>{r.d(n,{A:()=>s});const s=r.p+"assets/images/install_verdaccio-3d847df4c38426a92f123d51e4b566e4.gif"},92233:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>t});var s=r(70141);const i={},a=s.createContext(i);function c(e){const n=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.