# How to transport node-red devs between dev/acc/production environments

**URL:** <https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593>\
**Category:** General\
**Created:** [20 March 2024 14:00 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593 "2024-03-20T14:00:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anonymoose/32/89444_2.png) [@anonymoose](https://discourse.nodered.org/u/anonymoose)\
**Post date:** [20 March 2024 14:00 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593/1 "2024-03-20T14:00:14Z")

</div>

Which files should be synced across environments? It's important that local configurations like connection strings towards external systems are not overwritten.  
I have noticed that environmental variables are added in the flow.json file together with the value.  
This completely beats the purpose as transporting the flow.json file will reset the values!

So what is the correct approach to make sure the connection details are seperated from the developments itself to ensure easy transport?

---

<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:** [20 March 2024 19:15 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593/2 "2024-03-20T19:15:57Z")

</div>

> [@anonymoose](#):
>
> have noticed that environmental variables are added in the flow.json

Can you give a specific example of that? The flows file should not include environment variables.

---

<div class="post-metadata">

**Author:** ![anonymoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anonymoose/32/89444_2.png) [@anonymoose](https://discourse.nodered.org/u/anonymoose)\
**Post date:** [21 March 2024 07:41 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593/3 "2024-03-21T07:41:03Z")

</div>

I added the environmental variables on the flow itself. The file starts as such:

```
{
    "id": "96f135b65dd8f293",
    "type": "tab",
    "label": "Mendix Integration",
    "disabled": false,
    "info": "",
    "env": [
        {
            "name": "MendixURL",
            "value": "http://localhost:8070",
            "type": "str"
        },
        {
            "name": "PlantCode",
            "value": "1000",
            "type": "str"
        },
        {
            "name": "MendixPassword",
            "type": "cred"
        },
        {
            "name": "MendixUsername",
            "value": "ws",
            "type": "str"
        }
    ]
},

```

---

<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:** [21 March 2024 08:39 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593/4 "2024-03-21T08:39:20Z")

</div>

> [@anonymoose](#):
>
> I added the environmental variables on the flow itself.

Well if you don't want them in the flow then don't do it. Specify them in your node red startup script or in the OS system environment.

---

<div class="post-metadata">

**Author:** ![anonymoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/anonymoose/32/89444_2.png) [@anonymoose](https://discourse.nodered.org/u/anonymoose)\
**Post date:** [21 March 2024 11:41 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593/5 "2024-03-21T11:41:22Z")

</div>

I get that, but the concept of environmental variables is that the values behind the variables are seperated from the process. So either the terminology is out of place when it comes to defining these on flow level, or they should be seperated from the flow file.

---

<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:** [21 March 2024 15:47 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593/6 "2024-03-21T15:47:36Z")

</div>

> [@anonymoose](#):
>
> the concept of environmental variables is that the values behind the variables are seperated from the process.

Not necessarily. Node red provides additional flexibility in this case.

---

<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:** [19 June 2024 15:47 UTC](https://discourse.nodered.org/t/how-to-transport-node-red-devs-between-dev-acc-production-environments/86593/7 "2024-06-19T15:47:37Z")

</div>

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