# Preserve / store configuration on nodes

**URL:** https://discourse.nodered.org/t/preserve-store-configuration-on-nodes/10929
**Category:** General
**Created:** [8 May 2019 21:00 UTC](https://discourse.nodered.org/t/preserve-store-configuration-on-nodes/10929 "2019-05-08T21:00:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![PaulKeates1](https://avatars.discourse-cdn.com/v4/letter/p/97f17d/32.png) [@PaulKeates1](https://discourse.nodered.org/u/PaulKeates1)
#### Post date: [8 May 2019 21:00 UTC](https://discourse.nodered.org/t/preserve-store-configuration-on-nodes/10929/1 "2019-05-08T21:00:53Z")

</div>

Hi,

First - thanks for writing an awesome tool! NR has helped us immensely in multiple areas.

I want to be able to preserve / store / use parameters on nodes so that when they are deployed on a new instance of Node-RED a person does not need to edit a lot of nodes manually.

Example: mysql node, dashboard node.

I have a projects with multiple flows that includes the necessary mysql nodes with connection configuration parameters (Host; Port; User; Password; Database; Timezone). It also contains a complex dashboard. This is deployed onto a Node-RED test instance (in this example a Windows 10 machine). Once I'm finished writing / debugging I now want to deploy this project to a different production machine.

Currently I've been exporting / importing via the clipboard option. This works, in that you have a complete flow, but there are many, many manual tasks to complete afterwards. These tasks are sometimes incomplete and the process is fragile.

These tasks are:

1. Install nodes you have added that are not in the base packages - e.g. mysql, dashboard - so install them
2. Find every instance of the mysql node (I may have more than 30) and setup the specific parameters
3. Find and configure all of the dashboard nodes - this is even more painful than the mysql nodes
4. Save and redeploy
5. Retest / loop through until satisfied

Is there a way to 'copy' an image of a complete Node-RED instance and move it to another machine in a portable manner? I've started looking into Docker but wonder if that is more than I need.

I will need multiple copies of Node-RED running on one machine, so that was what lead me to Docker...

I'm open to ideas!

Cheers,  
Paul

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [9 May 2019 23:08 UTC](https://discourse.nodered.org/t/preserve-store-configuration-on-nodes/10929/2 "2019-05-09T23:08:46Z")

</div>

> [@PaulKeates1](#):
>
> Is there a way to 'copy' an image of a complete Node-RED instance and move it to another machine in a portable manner?

You could of course copy the node-red folder. All flows and installed nodes will be inside.

But if you have specific settings per device, this will still be a problem.

Perhaps instead of fixed specific values littered throughout your nodes, you could use environmental variables or flow/global context (node capability permitting)? You could have a single flow tab that sets up all specific variables into flow / global context (only one place to setup) and make your functional parts common?

---

<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: [10 May 2019 15:07 UTC](https://discourse.nodered.org/t/preserve-store-configuration-on-nodes/10929/3 "2019-05-10T15:07:15Z")

</div>

It is the "userDir" folder that you are interested in since this contains all of the configuration for a running instance of Node-RED.

You can easily copy it but note that it will generally contain a `node_modules` folder which it is best not to copy as it can be **very** large. To avoid that, copy without that folder then from a command line, switch to the copied folder and run `npm install`.
