What is verdaccio?
Verdaccio is a lightweight private npm proxy registry that allows you to host your own npm registry and cache npm packages. It is useful for speeding up npm installs, working offline, and hosting private packages.
What are verdaccio's main functionalities?
Private Registry
This configuration sets up Verdaccio as a private npm registry with authentication and proxying to the official npm registry.
const config = {
storage: './storage',
auth: {
htpasswd: {
file: './htpasswd'
}
},
uplinks: {
npmjs: {
url: 'https://registry.npmjs.org/'
}
},
packages: {
'@*/*': {
access: '$all',
publish: '$authenticated',
proxy: 'npmjs'
},
'**': {
access: '$all',
publish: '$authenticated',
proxy: 'npmjs'
}
}
};
module.exports = config;
Caching
This configuration allows Verdaccio to cache packages from the official npm registry, speeding up subsequent installs.
const config = {
storage: './storage',
uplinks: {
npmjs: {
url: 'https://registry.npmjs.org/'
}
},
packages: {
'**': {
access: '$all',
proxy: 'npmjs'
}
}
};
module.exports = config;
Offline Mode
This configuration sets up Verdaccio to work in offline mode, using only the locally cached packages.
const config = {
storage: './storage',
uplinks: {},
packages: {
'**': {
access: '$all'
}
}
};
module.exports = config;
Other packages similar to verdaccio
sinopia
Sinopia is an older private npm registry server that allows you to host your own npm registry. It is similar to Verdaccio but is no longer actively maintained.
npm-registry-couchapp
npm-registry-couchapp is a CouchDB-based npm registry implementation. It is more complex to set up compared to Verdaccio but offers more flexibility and scalability.
cnpm
cnpm is a private npm registry and web for Enterprise, base on the official npm registry. It is designed for use within a company and offers features like syncing with the official npm registry.
Verdaccio Core
npm install --global verdaccio
License
Verdaccio is MIT licensed
The Verdaccio documentation and logos (excluding /thanks, e.g., .md, .png, .sketch) files within the /assets folder) is
Creative Commons licensed.