<p>The registry URL is supplied by the <code>registry</code> config parameter. See
<code><ahref="../doc/config.html">config(1)</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
to force it to be published only to your internal registry.</p>
<p>See <code><ahref="../doc/json.html">json(1)</a></code> for more info on what goes in the package.json file.</p>
<h2id="Will-you-replicate-from-my-registry-into-the-public-one">Will you replicate from my registry into the public one?</h2>
<p>No. If you want things to be public, then publish them into the public
registry using npm. What little security there is would be for nought
otherwise.</p>
<h2id="Do-I-have-to-use-couchdb-to-build-a-registry-that-npm-can-talk-to">Do I have to use couchdb to build a registry that npm can talk to?</h2>
<p>No, but it's way easier.</p>
<h2id="I-published-something-elsewhere-and-want-to-tell-the-npm-registry-about-it">I published something elsewhere, and want to tell the npm registry about it.</h2>
<p>That is supported, but not using the npm client. You'll have to get
your hands dirty and do some HTTP. The request looks something like
this:</p>
<pre><code>PUT /my-foreign-package
content-type:application/json
accept:application/json
authorization:Basic $base_64_encoded
{ "name":"my-foreign-package"
, "maintainers":["owner","usernames"]
, "description":"A package that is hosted elsewhere"