# Enabling nodes automatically for double environment

**URL:** <https://discourse.nodered.org/t/enabling-nodes-automatically-for-double-environment/39695>\
**Category:** General\
**Created:** [25 January 2021 08:59 UTC](https://discourse.nodered.org/t/enabling-nodes-automatically-for-double-environment/39695 "2021-01-25T08:59:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meng](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Meng](https://discourse.nodered.org/u/Meng)\
**Post date:** [25 January 2021 08:59 UTC](https://discourse.nodered.org/t/enabling-nodes-automatically-for-double-environment/39695/1 "2021-01-25T08:59:13Z")

</div>

I am using a separate development and live node-red environment, so that i can work in the development environment without loosing uptime and input messages. Every time i am upgrading the live environment to the newest working development environment i have to enable/disable nodes and change credentials manually so that msg are not double received or connections are not lost (do to double envirenments). I now put all inputs double in the node red environment and disable the ones that are needed in a certain environment. I do this by hand, which costs time and is prone to errors. Is there a way that i am able to automate the enabling/disabling of nodes depending on the environment. I know in which environment the code is running.  
Switching after the input does not work, due to a double connection where the credentials can only be used once. Switching also causes loss of resources which are not needed.  
For now i am enabling/disabling mqtt nodes (both input and output), https in, timestamps running repeatedly, udp in and tcp in.

---

<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:** [26 March 2021 09:00 UTC](https://discourse.nodered.org/t/enabling-nodes-automatically-for-double-environment/39695/2 "2021-03-26T09:00:03Z")

</div>

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