<p>To resolve packages by name and version, npm talks to a registry website
that implements the CommonJS Package Registry specification for reading
package info.</p>
<p>Additionally, npm's package registry implementation supports several
write APIs as well, to allow for publishing packages and managing user
account information.</p>
<p>The official public npm registry is at <ahref="http://registry.npmjs.org/">http://registry.npmjs.org/</a>. It
is powered by a CouchDB database, of which there is a public mirror at
<ahref="http://skimdb.npmjs.com/registry">http://skimdb.npmjs.com/registry</a>. The code for the couchapp is
available at <ahref="http://github.com/npm/npm-registry-couchapp">http://github.com/npm/npm-registry-couchapp</a>.</p>
<p>The registry URL used is determined by the scope of the package (see
<code><ahref="../misc/npm-scope.html">npm-scope(7)</a></code>). If no scope is specified, the default registry is used, which is
supplied by the <code>registry</code> config parameter. See <code><ahref="../cli/npm-config.html">npm-config(1)</a></code>,
<code><ahref="../files/npmrc.html">npmrc(5)</a></code>, and <code><ahref="../misc/npm-config.html">npm-config(7)</a></code> for more on managing npm's configuration.</p>
<h2id="can-i-run-my-own-private-registry-">Can I run my own private registry?</h2>
<p>Yes!</p>
<p>The easiest way is to replicate the couch database, and use the same (or
similar) design doc to implement the APIs.</p>
<p>If you set up continuous replication from the official CouchDB, and then
set your internal CouchDB as the registry config, then you'll be able
to read any published packages, in addition to your private ones, and by
default will only publish internally. If you then want to publish a
package for the whole world to see, you can simply override the
<code>--registry</code> config for that command.</p>
<h2id="i-don-t-want-my-package-published-in-the-official-registry-it-s-private-">I don't want my package published in the official registry. It's private.</h2>
<p>Set <code>"private": true</code> in your package.json to prevent it from being