# NodeRed behind Proxy

**URL:** <https://discourse.nodered.org/t/nodered-behind-proxy/1514>\
**Category:** General\
**Created:** [11 July 2018 13:55 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514 "2018-07-11T13:55:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dane809](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@Dane809](https://discourse.nodered.org/u/Dane809)\
**Post date:** [11 July 2018 13:55 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/1 "2018-07-11T13:55:18Z")

</div>

Hi guys,

i have a proxy issue.  
Apt-get works but the npm proxy will not work correctly.  
I can not install nodes from manage palette, can´t send mails and http request will also not work.  
I tried to config the proxy with "npm config set proxy"  
I also tried to edit the node-red startup (/etc/systemd/system/Node-Red.service ) with uncomment the proxy settings and configure my proxy behind a company network.  
All my efforts does not succed.  
Can someone help me?  
Thanks alot for your support.

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [11 July 2018 14:14 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/2 "2018-07-11T14:14:11Z")

</div>

It sounds like your company's network security is blocking some of those sites and/or ports -- most likely you will have to get them to change their policies for accessing things like the npm repo.

But when you say that `http request` "does not work", that is strange... unless you are trying to access a restricted web site or non-standard port. What happens if you put that same url into your browser? What hw/os are you using to run node-red? what versions of npm, nodejs, and node-red are installed?

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [11 July 2018 14:26 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/3 "2018-07-11T14:26:01Z")

</div>

Sounds like it's time to speak to corporate IT.

---

<div class="post-metadata">

**Author:** ![Dane809](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@Dane809](https://discourse.nodered.org/u/Dane809)\
**Post date:** [11 July 2018 18:01 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/4 "2018-07-11T18:01:48Z")

</div>

It have to be a proxy issue from my raspberry or npm proxy. If i test it with my notebook in the same network (static ip and so on), same flow with local version of node red, it works.  
Is there one more directory where i have to edit the npm/nodered proxy?  
Additional: I write the proxy as a ip like [http://192.168.1.1:8000](http://192.168.1.1:8000)  
Is there a syntax error or something like this?

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [11 July 2018 20:09 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/5 "2018-07-11T20:09:44Z")

</div>

I'm not sure what you mean by "npm proxy" -- if your browser on the RPi can get to the web site, then your command line npm commands should be able to as well. Perhaps you don't have a valid dns server defined, or your default _gateway_ is not right?

If you have ssh access to the RPi, try running the `curl` command from a shell, with the web site url you are trying to connect to. That should give you some clue where the problem lies... Or as @ukmoose suggested, let your IT group figure out why you cannot get to the internet using npm -- they'll probably spend less time to fix it than I did to write this... 😉

---

<div class="post-metadata">

**Author:** ![Dane809](https://avatars.discourse-cdn.com/v4/letter/d/9de053/32.png) [@Dane809](https://discourse.nodered.org/u/Dane809)\
**Post date:** [12 July 2018 14:30 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/6 "2018-07-12T14:30:29Z")

</div>

Thanks for the curl command. It was a syntax error. Now the http request works. About my IT I won't say something 😂

---

<div class="post-metadata">

**Author:** ![asandford](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@asandford](https://discourse.nodered.org/u/asandford)\
**Post date:** [14 July 2018 18:29 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/7 "2018-07-14T18:29:24Z")

</div>

Circumventing the IT restrictions would be sackable by my employer

---

<div class="post-metadata">

**Author:** ![kaciker](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kaciker/32/45744_2.png) [@kaciker](https://discourse.nodered.org/u/kaciker)\
**Post date:** [30 July 2021 10:54 UTC](https://discourse.nodered.org/t/nodered-behind-proxy/1514/9 "2021-07-30T10:54:52Z")

</div>

this is a old topic, but I had the same problem and this was solved in the setup proxy node.js:

npm config set proxy [http://proxy.company.com:8080](http://proxy.company.com:8080/)
