Deploy Verdaccio
Private npm registry and npmjs cache with closed sign-up and admin login
Verdaccio
Just deployed
/verdaccio/storage
Deploy and Host Verdaccio on Railway
Verdaccio is an open-source, lightweight private npm registry written in Node.js. It stores the packages you publish and works as a caching proxy for npmjs.org, so teams can share private packages, keep installing while the public registry is down, and speed up CI installs. It works with npm, Yarn, pnpm and Bun.
About Hosting Verdaccio
Hosting Verdaccio means running one Node.js server with persistent storage for package tarballs, metadata, the user file and the token-signing secret. This template runs the official verdaccio/verdaccio:7.1.0 image, pinned by digest, with a Railway volume at /verdaccio/storage and a public HTTPS domain. A small start script writes the configuration on each boot. It closes open sign-up, requires a login to install or publish, creates an admin user with a generated password, and sets the public URL so tarball links use your Railway domain. The server drops root privileges before it starts, and redeploys keep your packages and tokens.
Common Use Cases
- Publish private or scoped company packages (for example
@your-team/ui) without paying for a hosted registry - Cache npmjs.org packages for faster, more reliable installs in CI and local development
- Test package releases end to end before publishing them to the public npm registry
Dependencies for Verdaccio Hosting
- A Railway volume mounted at
/verdaccio/storagefor packages, users and the server secret - Outbound HTTPS access to registry.npmjs.org for proxied public packages
Deployment Dependencies
- Verdaccio on GitHub: https://github.com/verdaccio/verdaccio
- Verdaccio 7.1.0 release notes: https://github.com/verdaccio/verdaccio/releases/tag/v7.1.0
- Docker documentation: https://verdaccio.org/docs/docker
- Migrating from Verdaccio 6 to 7: https://verdaccio.org/blog/2026/09/27/verdaccio-6-to-7-migration
- Start script used by this template: https://github.com/aalfath/verdaccio-railway-template
Implementation Details
After the deploy, open the service's Variables tab for VERDACCIO_ADMIN_USERNAME (default admin) and VERDACCIO_ADMIN_PASSWORD. Sign in to the web UI with them, or log in from your terminal. Verdaccio 7 only accepts tokens for package requests, so use the legacy login, which stores a token in your .npmrc:
npm login --auth-type=legacy --registry https://YOUR-DOMAIN.up.railway.app/
npm publish --registry https://YOUR-DOMAIN.up.railway.app/
npm install your-package --registry https://YOUR-DOMAIN.up.railway.app/
To use it for one scope only, add @your-team:registry=https://YOUR-DOMAIN.up.railway.app/ to your project's .npmrc.
Optional variables you can add to the service:
VERDACCIO_ACCESS: who may install packages. Default$authenticated; set$allto allow anonymous installs (this also makes your registry a public npm proxy).VERDACCIO_PUBLISH: who may publish and unpublish. Default$authenticated.VERDACCIO_MAX_USERS: default-1(sign-up closed). Set a number to let people create accounts withnpm adduser, then set it back to-1.VERDACCIO_TITLE,VERDACCIO_LOG_LEVEL(defaulthttp) andVERDACCIO_LOG_FORMAT(defaultpretty).
Changing VERDACCIO_ADMIN_PASSWORD and redeploying updates the admin password. Keep RAILWAY_RUN_UID=0: the start script needs root briefly to give the volume to the verdaccio user.
Why Deploy Verdaccio on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Verdaccio on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Verdaccio
verdaccio/verdaccio:7.1.0