Search code examples
node.jsnpmverdaccio

How to migrate private Verdaccio npm registry to another server?


I'm planning to setup private npm registry for our internal Node.js/web projects, and seems that Verdaccio is the best open-source choice for it.

Before starting to publish my private packages there I want to be sure that an easy way to move Verdaccio installation with all published packages to another server exists. Here is a similar question for Sinopia Verdaccio project is forked from. Folks there say that we should simply move entire sinopia directory to another server. But what is the exact directory and what is the directory (or, probably, few directories) for Verdaccio?

I have Node.js installed by nvm script and Verdaccio installed globally the following way:

npm install -g verdaccio

Solution

  • Here Verdaccio core maintainer. Not long time ago I've written down the required steps to move from latest Sinopia to any Verdaccio (v3,v4-alpha).

    In a nutshell (for UNIX):

    1. The folder ~/.local/share/sinopia must be renamed to ~/.local/share/verdaccio
    2. The folder ~/.config/sinopia must be renamed to ~/.config/verdaccio

    There is an additional step, not required, but recommended:

    1. The file ~/.config/sinopia/storage/.sinopia-db.json must be renamed to ~/.local/share/verdaccio/storage/.verdaccio-db.json

    To find the Windows location, check the following link.

    I hope this helps. Original source in the link below.

    https://verdaccio.org/blog/2019/02/24/migrating-verdaccio#migrating-from-sinopia-140-to-verdaccio-2x-3x