# Installing Custom Node to Remote Server

**URL:** <https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151>\
**Category:** Core Development\
**Created:** [19 February 2019 13:04 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151 "2019-02-19T13:04:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mitchwadair](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mitchwadair/32/6117_2.png) [@mitchwadair](https://discourse.nodered.org/u/mitchwadair)\
**Post date:** [19 February 2019 13:04 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/1 "2019-02-19T13:04:12Z")

</div>

Hello!

I am currently working on using the Admin HTTP API to install nodes to Node-RED servers. Installing to a local server is simple enough, and has no issues, but I am curious about installing a custom node to a remote Node-RED server.

The [documentation](https://nodered.org/docs/api/admin/methods/post/nodes/) shows that the POST method takes either a path to the node on your machine or the name of a module in the npm repository. Seeing as passing a local path to a directory would not work on a remote server, it seems that the only way to put a node onto a remote server is to publish the custom node to npm and install it that way. Is this thinking correct, or is there another way to do this that I am missing? In addition to this, if my thinking is correct, are there plans to add support for uploading custom nodes directly to a remote server through the API to install them rather than having to publish to npm?

Thank you!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 February 2019 13:29 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/2 "2019-02-19T13:29:36Z")

</div>

I have never done it, but presumably you could copy the node to the remote server then use the api to install it from that directory.

---

<div class="post-metadata">

**Author:** ![mitchwadair](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mitchwadair/32/6117_2.png) [@mitchwadair](https://discourse.nodered.org/u/mitchwadair)\
**Post date:** [19 February 2019 20:02 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/3 "2019-02-19T20:02:48Z")

</div>

This could be a good solution but, at the same time, is there a good way to generalize this to cover any remote server? I feel like there would be issues that arise around access credentials and differences in OS structure that could prevent a good general-purpose method of accomplishing it this way. But I could be overthinking it

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 February 2019 21:37 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/4 "2019-02-19T21:37:38Z")

</div>

If you need to publish to multiple servers but don't want to publish to npm then I believe there are various ways of having a private npm repository. Google will show you some no doubt. Alternatively you could just put them in a git repository on github or similar (which can be private) and pick them up from there.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 February 2019 22:20 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/5 "2019-02-19T22:20:35Z")

</div>

one way is to use `npm pack` to package your node locally - then you can distribute the tgz file it creates as you wish - then run `npm install yournodename.tgz` in the .node-red directory as usual.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [19 February 2019 23:07 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/6 "2019-02-19T23:07:49Z")

</div>

Does the old method of using the nodes folder still work? If it does, you could copy the nodes though you would still need to restart NR.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 February 2019 23:19 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/7 "2019-02-19T23:19:28Z")

</div>

> [@mitchwadair](#):
>
> In addition to this, if my thinking is correct, are there plans to add support for uploading custom nodes directly to a remote server through the API to install them rather than having to publish to npm?

To address the bit of your question that hasn't been answered - there are no plans for this because it has never come up as a requirement.

When I created the api in the first place, I did recognise it might be something we could add - but at the time there was no need for it, so nothing more happened.

I'm sure its something we could put on the backlog to explore at some point - without committing either way on it.

---

<div class="post-metadata">

**Author:** ![mitchwadair](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mitchwadair/32/6117_2.png) [@mitchwadair](https://discourse.nodered.org/u/mitchwadair)\
**Post date:** [20 February 2019 13:27 UTC](https://discourse.nodered.org/t/installing-custom-node-to-remote-server/8151/8 "2019-02-20T13:27:36Z")

</div>

Thank you everybody for the responses. These were all helpful!
