{"id":16293586,"url":"https://github.com/badsyntax/private-npm-registry","last_synced_at":"2025-07-05T00:34:21.747Z","repository":{"id":136895278,"uuid":"37487506","full_name":"badsyntax/private-npm-registry","owner":"badsyntax","description":"(WIP) A private npm registry","archived":false,"fork":false,"pushed_at":"2015-06-18T18:00:03.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T05:15:02.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badsyntax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-15T19:47:48.000Z","updated_at":"2015-06-16T09:02:59.000Z","dependencies_parsed_at":"2023-03-13T21:00:37.428Z","dependency_job_id":null,"html_url":"https://github.com/badsyntax/private-npm-registry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fprivate-npm-registry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fprivate-npm-registry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fprivate-npm-registry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badsyntax%2Fprivate-npm-registry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badsyntax","download_url":"https://codeload.github.com/badsyntax/private-npm-registry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027412,"owners_count":21035594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T20:11:48.309Z","updated_at":"2025-04-09T11:13:39.003Z","avatar_url":"https://github.com/badsyntax.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview \n\nThis is a WIP project that demonstrates how to create a private npm registry within \na Virtual Machine, and how to use that private registry with the npm client.\n\nThe private registry will replicate the public registry. You can pubish\nand install private modules, and install public modules, but you cannot\npublish any modules to the public registry.\n\nIt uses https://github.com/npm/npm-registry-couchapp for the couchdb registry.\n\n## Getting started\n\nYou'll need the latest versions of Vagrant and VirtualBox installed.\n\n```\ngit clone https://github.com/badsyntax/private-npm-registry private-npm-registry \u0026\u0026 cd $_\nvagrant up\n```\n\nEdit your hosts file (`/etc/hosts`) and add:\n\n```\n192.168.50.4 registry.mydomain.com\n```\n\n## Using CouchDB\n\n* View https://registry.mydomain.com/.\n* View http://192.168.50.4/_utils/ for admin interface.\n\n### Admin credentials\n\n* Username: admin\n* Password: password\n\n## Using the registry\n\nSet the registry, let npm accept self-signed certs, and login:\n\n```\nnpm config set always-auth true\nnpm config set registry https://admin:password@registry.mydomain.com/\nnpm config set strict-ssl 0\nnpm login\n```\n\n### Switching back to the public registry\n\n```\nnpm config set registry https://registry.npmjs.org/\nnpm config set strict-ssl 1\nnpm login\n```\n\n## Authentication\n\nThe current strategy is to provide the admin auth credentials as part of the registry URL\nand let couchdb handle the auth. Couchdb admin credentials are stored in plaint text which is not ideal! \n\nIt would perhaps be better to lock down the `npm login` operation to prevent new users \nfrom being created, and then manually create users on the registry server to allow read/write.\n\nEven better, provide a custom authenticator for `npm login` to use 3rd party auth services.\n\n### TODO\n\n* Couchdb SSL\n* Proxy public repos to the public registry instead of replication\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadsyntax%2Fprivate-npm-registry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadsyntax%2Fprivate-npm-registry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadsyntax%2Fprivate-npm-registry/lists"}