node package manager


Use an ldap server to auth for your private npm


Use ldap as authentication for your private npm.


  1. First you must have unpm installed. See
  2. In the unpm directory do npm install unpm-auth-ldap
  3. Alter the unpm/lib/config.json make it look like
  "auth" : {
    "authenticated_gets": true,
    "whitelist": ["/_session"],
    "module" : "unpm-auth-ldap",
    "config": {
      "url": "ldap://",
      "searchBase": "ou=Users,dc=dago2",
      "searchFilter": "(uid={{username}})",
      "verbose": true

The config section is from ldapauth. See for config


To help store your ldap credentials in a .npmrc file, you can use this small util:

npm install unpm-auth-ldap -g
generate-ldap-npmrc <username> <password> <email>

Where username and password are your ldap credentials.