---
title: Npm Behind a Proxy Server
---
## Use-cases
You might need to modify `npm install` commands that access remote repositories (npmjs, for example) for installing Node JS modules; if your internet access is through a proxy server.
Proxy servers are common in college and business type environments.
You can locate your proxy settings from your browser's settings panel.
## Using Proxy with NPM
Once you have obtained the proxy settings (server URL, port, username and password); you need to configure your `npm` configurations as follows.
$ npm config set proxy http://:@:
$ npm config set https-proxy http://:@:
You would have to replace ``, ``, ``, `` with the values specific to your proxy server credentials.
These fields are optional. For instance, your proxy server might not even require `` and ``, or that it might be running on port 80 (in which case `` is not required).
Once you have set these, your `npm install`, `npm i -g` etc. would work properly.
## When Not to Use
You should not have to use `npm` commands with proxy settings, if either of the following happens:
> * Your system administrator or corporate policy does not allow you to access remote `npm` repositories from NPM-JS, for instance.
> * The remote repository of Node modules in question is not in your machine, but it's within the internal network.
## Unset Proxy Settings
Use this blog post to unset your proxy settings. You can also manually remove the lines specifying your proxy settings from your `.npmrc` file.
## Resources
You may use the following resources for further reading on this:-
> * Can I Log In Behind A Proxy Server
> * NPM Behind A Corporate Proxy