Verdaccio

Verdaccio

  • Docs
  • Blog
  • Twitter
  • Help
  • GitHub
  • Contributors
  • Sponsor Us
  • Languages iconFrançais
    • English
    • Español
    • 中文
    • Russian
    • Yoruba
    • Aidez à traduire

›Server

Introduction

  • C'est quoi Verdaccio?
  • Installation
  • Outil de ligne de commande
  • Using a private registry
  • Who is using Verdaccio?
  • Security Policy
  • Logotype
  • Uses Cases

    • End to End testing
    • Caching strategies
    • GitHub Actions
    • Linking a Remote Registry

    Talks & Articles

    • Articles
    • Talks

Features

  • Fichier de configuration
  • Uplinks
  • Paquet d'accès
  • Authentication
  • Notifications
  • Enregistreur
  • Interface d'Utilisateur Web

Server

  • Configuration du serveur
  • Configuration du proxy inverse
  • Configurez les Certificats SSL
  • Installation en tant que service Windows
  • Installation sur le serveur IIS

Development

  • Plugins
  • Développement des Plugins
  • Dev Guides

    • Plugin Generator
    • Plugin d’authentification
    • Plugin Middleware
    • Plugin de stockage
  • Node API

DevOps

  • Docker
  • Kubernetes
  • Intégration Continue
  • Cloud

    • Amazon Web Services

    Tools

    • Ansible
    • Puppet
    • Chef Cookbook

Guides

  • Best Practices
  • Protection des paquets
  • Amazon Web Services
Translate

Configuration du serveur

This is mostly basic Linux server configuration stuff but I felt it important to document and share the steps I took to get Verdaccio running permanently on my server. You will need root (or sudo) permissions for the following steps.

Gérer en tant qu'utilisateur distinct

First create a Verdaccio user:

$ sudo adduser --system --gecos 'Verdaccio NPM mirror' --group --home /var/lib/verdaccio verdaccio

Or, in case you do not have adduser:

$ sudo useradd --system --comment 'Verdaccio NPM mirror' --create-home --home-dir /var/lib/verdaccio --shell /sbin/nologin verdaccio

You create a shell as the Verdaccio user using the following command:

$ sudo su -s /bin/bash verdaccio
$ cd

The cd command sends you to the home directory of the Verdaccio user. Make sure you run Verdaccio at least once to generate the config file. Edit it according to your needs.

À l'écoute de toutes les adresses

If you want to listen to every external address set the listen directive in the config to:

# you can specify listen address (or simply a port)
listen: 0.0.0.0:4873

If you are running Verdaccio in a Amazon EC2 Instance, you will need set the listen in change your config file as is described above.

Configure Apache or nginx? Please check out the Reverse Proxy Setup

Keeping Verdaccio running forever

You can use a Node package called 'forever' to keep Verdaccio running all the time.

First install forever globally:

$ sudo npm install -g forever

Make sure you've run Verdaccio at least once to generate the config file and write down the created admin user. You can then use the following command to start Verdaccio:

$ forever start `which verdaccio`

You can check the documentation for more information on how to use forever.

Durée de redémarrage du serveur

You can use crontab and forever together to start Verdaccio after a server reboot.

When you're logged in as the Verdaccio user do the following:

$ crontab -e

This might ask you to choose an editor. Pick your favorite and proceed. Add the following entry to the file:

@reboot /usr/bin/forever start /usr/lib/node_modules/verdaccio/bin/verdaccio

The locations may vary depending on your server setup. If you want to know where your files are you can use the 'which' command:

$ which forever
$ which verdaccio

Using systemd

Instead of forever you can use systemd for starting Verdaccio and keeping it running. Verdaccio installation has systemd unit, you only need to copy it:

$ sudo cp /usr/lib/node_modules/verdaccio/systemd/verdaccio.service /lib/systemd/system/ && sudo systemctl daemon-reload

This unit assumes you have configuration in /etc/verdaccio/config.yaml and store data in /var/lib/verdaccio, so either move your files to those locations or edit the unit.

← Interface d'Utilisateur WebConfiguration du proxy inverse →
  • Gérer en tant qu'utilisateur distinct
  • À l'écoute de toutes les adresses
  • Keeping Verdaccio running forever
  • Durée de redémarrage du serveur
  • Using systemd
Verdaccio
Docs
Getting StartedDockerConfigurationLogos
Community
User ShowcaseStack OverflowProject ChatFollow Verdaccio on Twitter
More
BlogGitHubStar