---
title: "Deploy Verdaccio | (Just Updated) Private npm Registry, Closed Signup, Generated Admin Login"
description: "Verdaccio private npm registry and proxy cache, generated admin login"
category: "Other"
url: https://railway.com/deploy/verdaccio-or-just-updated-private-npm-re
---

# Deploy Verdaccio | (Just Updated) Private npm Registry, Closed Signup, Generated Admin Login

Verdaccio private npm registry and proxy cache, generated admin login

**[Deploy Verdaccio | (Just Updated) Private npm Registry, Closed Signup, Generated Admin Login on Railway](https://railway.com/template/verdaccio-or-just-updated-private-npm-re)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/verdaccio-or-just-updated-private-npm-re/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Other

## Template content

### verdaccio

- **Image:** ghcr.io/bon5co/verdaccio-railway:7.0.2@sha256:0330599243b13722f49ebfb55a4a206e8e31773c05bac09a36e6740c78892125
- **Health check:** /
- **Public domain:** Yes

## Documentation

# Deploy and Host Verdaccio on Railway

**Built for an LLM agent to deploy and use.** There is nothing to fill in: the admin password is generated at deploy time, self-registration is off, every package needs a login, the contract below lists every URL and variable name, and one working script logs in, publishes a package and installs it back.

Verdaccio is a lightweight private npm registry and proxy cache: publish your internal packages, and cache everything else from registry.npmjs.org so installs are fast and repeatable. This template runs Verdaccio 7 with a small wrapper that creates the admin login and closes the registry, and keeps the package store on a Railway volume so published packages survive redeploys.

## About Hosting Verdaccio

This template runs one service, built from the official **verdaccio/verdaccio** `7.0.2` image (pinned by digest) in the public wrapper [bon5co/verdaccio-railway](https://github.com/bon5co/verdaccio-railway), with the volume at `/verdaccio/storage`. The stock image lets anyone on the internet register an account and publish; this one does not. The htpasswd file is rewritten at every boot with a single `admin` user whose password is `VERDACCIO_ADMIN_PASSWORD`, self-registration is disabled (`max_users: -1`), and read, publish and unpublish all require a login, so a public URL does not turn into an open package host. Unknown packages are fetched from registry.npmjs.org and cached on the volume. The entrypoint runs as root only to fix ownership of the root-owned Railway volume, then drops to the `verdaccio` user. It listens on the Railway port on IPv4 and IPv6, so other services in the project reach it over the private network.

### Agent contract

- Public URL: `https://`, on the `verdaccio` service (set `VERDACCIO_URL` to it, no trailing slash)
- Private URL: `http://verdaccio.railway.internal:8080`
- Credentials: user `admin`, password in `VERDACCIO_ADMIN_PASSWORD` (on the `verdaccio` service)
- Auth: log in once with HTTP Basic on `PUT /-/user/org.couchdb.user:admin` (credentials repeated in the JSON body) to get a token, then send `Authorization: Bearer `, or put it in `.npmrc` as `///:_authToken=`; anonymous package requests get 401, new registrations get 409
- Health: `GET /` returns 200 with no credentials

```bash
# run with VERDACCIO_URL, VERDACCIO_ADMIN_PASSWORD (verdaccio service); needs curl and npm
HOST="${VERDACCIO_URL#https://}"
curl -s -o /dev/null -w 'health %{http_code}\n' "$VERDACCIO_URL/"
curl -s -o /dev/null -w 'anonymous %{http_code}\n' "$VERDACCIO_URL/left-pad"
TOKEN=$(curl -s -u "admin:$VERDACCIO_ADMIN_PASSWORD" -X PUT -H 'content-type: application/json' \
  -d "{\"name\":\"admin\",\"password\":\"$VERDACCIO_ADMIN_PASSWORD\"}" \
  "$VERDACCIO_URL/-/user/org.couchdb.user:admin" | sed -n 's/.*"token": *"\([^"]*\)".*/\1/p')
echo "token ${#TOKEN} chars"
W=$(mktemp -d); cd "$W"; mkdir pkg app
printf '{"name":"railway-probe","version":"1.0.0"}' &gt; pkg/package.json
printf 'registry=%s/\n//%s/:_authToken=%s\n' "$VERDACCIO_URL" "$HOST" "$TOKEN" &gt; pkg/.npmrc
(cd pkg &amp;&amp; npm publish 2&gt;&amp;1 | tail -1)
cp pkg/.npmrc app/.npmrc; echo '{}' &gt; app/package.json
(cd app &amp;&amp; npm install railway-probe 2&gt;&amp;1 | tail -1 &amp;&amp; ls node_modules)
```

A fresh deploy prints `health 200`, `anonymous 401`, a token of 92 characters, `+ railway-probe@1.0.0` and `railway-probe` from the install. Point a project at it with `npm config set registry $VERDACCIO_URL/` plus the `_authToken` line above; scoped teams can route only their scope with `@myorg:registry=$VERDACCIO_URL/`.

## 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.

- **Agent-ready** - generated admin password, a contract block and one working script; no signup page, no setup step.
- **Closed by default** - registration is off and every package request needs a login.
- **Stable login** - the admin password is the same after every redeploy, and changing the variable changes the login.
- **State survives redeploys** - published packages and the npm cache live on the volume.

## Common Use Cases

- **Private packages** - publish internal libraries and CLIs without paying for a hosted registry.
- **npm proxy cache** - cache registry.npmjs.org so CI installs are fast and survive upstream outages.
- **Agent-driven publishing** - let an AI agent build and publish packages, then install them in another service over the private network.

## Dependencies for Verdaccio Hosting

- A volume at `/verdaccio/storage` (included in this template).

### Deployment Dependencies

- [verdaccio/verdaccio](https://github.com/verdaccio/verdaccio) - upstream project
- [bon5co/verdaccio-railway](https://github.com/bon5co/verdaccio-railway) - the wrapper image this template deploys, built from verdaccio/verdaccio 7.0.2


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/verdaccio-or-just-updated-private-npm-re
