# Create plugin for custom node

**URL:** <https://discourse.nodered.org/t/create-plugin-for-custom-node/23873>\
**Category:** General\
**Created:** [30 March 2020 05:55 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873 "2020-03-30T05:55:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [30 March 2020 05:55 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873/1 "2020-03-30T05:55:12Z")

</div>

I have created a custom node successfully, now I need to create a plugin for this node so that we can easily install into any servers into 1 click please help me out with this.

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [30 March 2020 05:59 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873/2 "2020-03-30T05:59:31Z")

</div>

well you could use npm install ?  
I am maybe not fully understanding your quesiton...

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [30 March 2020 06:03 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873/3 "2020-03-30T06:03:53Z")

</div>

So I have created custom node in my node-red and if I need to install to some where else in server then I need to place that node file from my device to that server then I have to npm install it and these is not possible to copy paste that file from my device to server I need some thing plugin type that should install with just npm install without copy pasting

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [30 March 2020 06:11 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873/4 "2020-03-30T06:11:05Z")

</div>

On what OS are you using node-red?  
I would:

1. Upload the node to Github

2. Write a bash or python script that should download the GitHub package move it to .node-red, open the dir .node red run npm install, and delete the downloaded package.

3. You could use curl to run a command, it should look something like this:

```auto
curl https://example/main.py --output main.py && python main.py

```

---

<div class="post-metadata">

**Author:** ![Iliyas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iliyas/32/19045_2.png) [@Iliyas](https://discourse.nodered.org/u/Iliyas)\
**Post date:** [30 March 2020 06:12 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873/5 "2020-03-30T06:12:23Z")

</div>

I'm using windows OS

---

<div class="post-metadata">

**Author:** ![lizzardguki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lizzardguki/32/103637_2.png) [@lizzardguki](https://discourse.nodered.org/u/lizzardguki)\
**Post date:** [30 March 2020 06:27 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873/6 "2020-03-30T06:27:17Z")

</div>

Okay, I think to have the easiest solution, I just remembered that I read it somewhere on the forum a couple of days ago...

1. Upload your node to npm.
2. In the .node-red directory, you should see a package.json file, if you open it you will see a list of your installed nodes.

Now on the computer that you want to install you should:

1. Turn off node-red
2. Edit package.json and add the node name that you previously uploaded to npm, save the file
3. Run npm install
4. Start node-red  
Your nodes from package.json will be installed  
msg me in private messages if you have anymore issues, i will be glad to help you...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 May 2020 06:28 UTC](https://discourse.nodered.org/t/create-plugin-for-custom-node/23873/7 "2020-05-29T06:28:06Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
