Verdaccio
Overview
Verdaccio is a lightweight open-source private npm registry and proxy built on Node.js. It lets teams publish private packages, cache packages from the public npm registry, and control access with simple htpasswd authentication, without standing up a heavyweight artifact server.
The SecureAnyCloud image installs Verdaccio 6.7.2 on Node.js 22 LTS and runs it as a systemd service behind an nginx reverse proxy on port 80. It stores the registry configuration, package storage and the htpasswd auth database on a dedicated Azure data disk, and generates a unique admin account on the first boot of every VM.
What you get:
- Verdaccio 6.7.2 on Node.js 22 LTS, installed globally
- The web UI and npm registry published on port 80 via nginx (with WebSocket upgrade and a 1 GiB body limit for large tarball publishes)
- An uplink to the public npm registry so any package not published locally is proxied and cached
- A dedicated Azure data disk at
/var/lib/verdacciofor config, package storage and the htpasswd auth database - A unique admin account generated on first boot, written to a root-only credentials file
verdaccio.serviceandnginx.serviceas systemd units, enabled and active- 24/7 SecureAnyCloud support
Prerequisites
Before you deploy this image, you need:
- An active Azure subscription, an SSH key pair, and a VNet with a subnet in the target region
- A VM size of Standard_B2ms (2 vCPU / 8 GiB RAM), which is a good starting point
- NSG inbound rules allowing
22/tcpfrom your management network and80/tcpfor the registry and web UI. Front the registry with TLS for public exposure (see Enabling HTTPS)
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal and choose Create a resource. Search the Marketplace for Verdaccio by SecureAnyCloud, and select Create.
On Basics, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key.
Under Inbound port rules, allow SSH (22) and HTTP (80). Review the dedicated data disk on the Disks tab, then select Review + create and Create.
Step 2 - Deploy from the Azure CLI
Accept the Marketplace terms once per subscription, then create the VM and open port 80. Replace the values in angle brackets with your own:
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:verdaccio-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name verdaccio \
--image sac1647283583153:verdaccio-ubuntu-24-04:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name verdaccio --port 80 --priority 1010Step 3 - Connect to your VM
Connect over SSH as azureuser:
ssh azureuser@<vm-public-ip>Step 4 - Confirm the services are running
Check both services:
systemctl is-active verdaccio.service nginx.serviceBoth report active. On first boot Verdaccio generates a unique admin account and writes the htpasswd auth database.
Step 5 - Retrieve your admin credentials
The admin password is generated uniquely on the first boot of your VM and written to a root-only file:
sudo cat /root/verdaccio-credentials.txtThis file contains verdaccio.admin.user (admin) and verdaccio.admin.pass. Store the password somewhere safe.
Step 6 - Check the health endpoint
Verdaccio exposes a liveness endpoint that returns 200:
curl -s -o /dev/null -w '%{http_code}\n' http://localhost/-/pingStep 7 - Open the web UI
Browse to http://<vm-public-ip>/ and sign in with admin and the password from Step 5.
Use the sign-in dialog in the top-right of the UI to authenticate with your admin account.
The web UI shows installation and login help for each package once you have published one, and the empty-registry welcome until then.
Once signed in, the UI shows that you are authenticated, along with the published package list.
Step 8 - Confirm your credentials authenticate
Every package on the registry requires authentication. Confirm that the generated admin credentials work by requesting a package with HTTP Basic auth. A valid login returns 200. A missing or wrong password returns 401:
curl -s -o /dev/null -w '%{http_code}\n' -u 'admin:<VERDACCIO_ADMIN_PASSWORD>' http://localhost/lodashThe npm login command (Step 9) performs the same authentication for the npm CLI and stores a token in your ~/.npmrc.
Step 9 - Point npm at your registry
From a developer machine, point npm at the registry and log in (user admin, the password from Step 5):
npm set registry http://<vm-public-ip>/
npm login --registry http://<vm-public-ip>/Install packages as usual. Anything not published privately is proxied and cached from the public npm registry:
npm install lodashStep 10 - Publish a private package
In a package directory, publish to your registry:
npm publish --registry http://<vm-public-ip>/The package and its tarball are stored on the dedicated data disk and appear in the web UI. Use a scope, for example @yourorg/pkg, to keep private packages separate from public ones.
Step 11 - Confirm storage lives on the dedicated disk
The configuration, package storage and htpasswd auth database are stored on the dedicated Azure data disk so they survive OS changes and can be resized independently:
findmnt /var/lib/verdaccioThe mount is backed by a separate Azure data disk captured into the image and re-provisioned on every VM.
Enabling HTTPS
The nginx reverse proxy terminates plain HTTP on port 80. For public exposure, put a certificate in front of it.
Add a DNS name for the VM and install certbot, or use the companion SecureAnyCloud nginx-ssl-certbot image as a TLS reverse proxy. Keep Verdaccio bound to loopback (127.0.0.1:4873), so the only public surface is the TLS-terminated proxy.
If you serve under a path, set url_prefix and the public URL in /var/lib/verdaccio/config.yaml, then restart Verdaccio.
Maintenance
- Backups: snapshot the
/var/lib/verdacciodata disk to back up the configuration, package storage and auth database. - Users: add or update accounts with
sudo htpasswd /var/lib/verdaccio/htpasswd <username>and restart Verdaccio. - Service: run
sudo systemctl restart verdaccioafter configuration changes. Read the logs withjournalctl -u verdaccio. - Security patches: unattended-upgrades remains enabled so the OS continues to receive security updates automatically.
Support
SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.
Deploy on Azure
Launch Verdaccio on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
Verdaccio is a lightweight open-source private npm registry and proxy built on Node.js. It lets teams publish private packages, cache packages from the public npm registry, and control access with simple htpasswd authentication, without standing up a heavyweight artifact server.
The SecureAnyCloud image installs Verdaccio on Node.js LTS and runs it as a systemd service behind an nginx reverse proxy on port 80. It stores the registry configuration, package storage and the htpasswd auth database on a dedicated data volume, and generates a unique admin account on the first boot of every instance.
What you get:
- Verdaccio on Node.js LTS, installed globally
- The web UI and npm registry published on port 80 via nginx (with WebSocket upgrade and a 1 GiB body limit for large tarball publishes)
- An uplink to the public npm registry so any package not published locally is proxied and cached
- A dedicated data volume at
/var/lib/verdacciofor config, package storage and the htpasswd auth database - A unique admin account generated on first boot, written to a root-only credentials file
verdaccio.serviceandnginx.serviceas systemd units, enabled and active- 24/7 SecureAnyCloud support
Prerequisites
Before you deploy this image, you need:
- An Amazon Web Services account where you can launch EC2 instances, an EC2 key pair in the target Region, and a VPC with a subnet
- An instance type of m5.large, which is a good starting point
- Security group inbound rules allowing
22/tcpfrom your management network and80/tcpfor the registry and web UI. Front the registry with TLS for public exposure (see Enabling HTTPS)
Launch the instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance.
Under Application and OS Images, choose AWS Marketplace AMIs and search for Verdaccio by SecureAnyCloud. Select the SecureAnyCloud listing and choose Select, then Continue on the subscription summary.
Pick your instance type and EC2 key pair. Under Network settings, select a security group that allows inbound ports 22 and 80 as described above. Then select Launch instance.
Launch the instance from the AWS CLI
Launch the instance with the AWS CLI. Replace the values in angle brackets with your own:
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type m5.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=verdaccio-01}]'Connect to your instance
The SSH login user depends on the operating system of the AMI variant you launched. For Verdaccio on Ubuntu 24.04, the login user is ubuntu:
ssh -i <path-to-key>.pem ubuntu@<instance-public-ip>Confirm the services are running
Check both services:
systemctl is-active verdaccio.service nginx.serviceBoth report active. On first boot Verdaccio generates a unique admin account and writes the htpasswd auth database.
Retrieve your admin credentials
The admin password is generated uniquely on the first boot of your instance and written to a root-only file:
sudo cat /root/verdaccio-credentials.txtThis file contains verdaccio.admin.user (admin) and verdaccio.admin.pass. Store the password somewhere safe.
Check the health endpoint
Verdaccio exposes a liveness endpoint that returns 200:
curl -s -o /dev/null -w '%{http_code}\n' http://localhost/-/pingOpen the web UI
Browse to http://<instance-public-ip>/ and sign in with admin and the password from Step 5.
Use the sign-in dialog in the top-right of the UI to authenticate with your admin account.
The web UI shows installation and login help for each package once you have published one, and the empty-registry welcome until then.
Once signed in, the UI shows that you are authenticated, along with the published package list.
Confirm your credentials authenticate
Every package on the registry requires authentication. Confirm that the generated admin credentials work by requesting a package with HTTP Basic auth. A valid login returns 200. A missing or wrong password returns 401:
curl -s -o /dev/null -w '%{http_code}\n' -u 'admin:<VERDACCIO_ADMIN_PASSWORD>' http://localhost/lodashThe npm login command (Step 9) performs the same authentication for the npm CLI and stores a token in your ~/.npmrc.
Point npm at your registry
From a developer machine, point npm at the registry and log in (user admin, the password from Step 5):
npm set registry http://<instance-public-ip>/
npm login --registry http://<instance-public-ip>/Install packages as usual. Anything not published privately is proxied and cached from the public npm registry:
npm install lodashPublish a private package
In a package directory, publish to your registry:
npm publish --registry http://<instance-public-ip>/The package and its tarball are stored on the dedicated data volume and appear in the web UI. Use a scope, for example @yourorg/pkg, to keep private packages separate from public ones.
Confirm storage lives on the dedicated volume
The configuration, package storage and htpasswd auth database are stored on the dedicated data volume so they survive OS changes and can be resized independently:
findmnt /var/lib/verdaccioThe mount is backed by a separate EBS data volume captured into the image and provisioned on every instance.
Enabling HTTPS
The nginx reverse proxy terminates plain HTTP on port 80. For public exposure, put a certificate in front of it.
Add a DNS name for the instance and install certbot, or use the companion SecureAnyCloud nginx-ssl-certbot image as a TLS reverse proxy. Keep Verdaccio bound to loopback (127.0.0.1:4873), so the only public surface is the TLS-terminated proxy.
If you serve under a path, set url_prefix and the public URL in /var/lib/verdaccio/config.yaml, then restart Verdaccio. Add 443/tcp to your security group inbound rules.
Maintenance
- Backups: snapshot the
/var/lib/verdacciodata volume to back up the configuration, package storage and auth database. - Users: add or update accounts with
sudo htpasswd /var/lib/verdaccio/htpasswd <username>and restart Verdaccio. - Service: run
sudo systemctl restart verdaccioafter configuration changes. Read the logs withjournalctl -u verdaccio. - Security patches: unattended-upgrades remains enabled so the OS continues to receive security updates automatically.
Support
SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.
Deploy on AWS
Launch Verdaccio on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need help?
Our support team is available 24/7.
sales@secureanycloud.com