# Disabling flows during startup

**URL:** https://discourse.nodered.org/t/disabling-flows-during-startup/41355
**Category:** General
**Created:** [20 February 2021 16:30 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355 "2021-02-20T16:30:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![augjoh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/augjoh/32/26464_2.png) [@augjoh](https://discourse.nodered.org/u/augjoh)
#### Post date: [20 February 2021 16:30 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355/1 "2021-02-20T16:30:36Z")

</div>

Hello everybody,

I'm running a Node-RED project with mutliple flows. I would like to enable/disable some flows during startup. I've seen, that this is possible using the admin web interface. Is this possible using `settings.js`, the command-line, or the API?

---

<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 February 2021 17:32 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355/2 "2021-02-20T17:32:06Z")

</div>

What do you mean by disable during startup? Do you mean you want to startup with certain flows disabled and they should remain disabled, or you just want them disabled temporarily during startup, which I think is what the question implies, but doesn't make sense.

---

<div class="post-metadata">

### Author: ![augjoh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/augjoh/32/26464_2.png) [@augjoh](https://discourse.nodered.org/u/augjoh)
#### Post date: [20 February 2021 17:48 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355/3 "2021-02-20T17:48:38Z")

</div>

I'm looking for a method to disable flows permanently as long as Node-RED is running. These flows should be selected during startup.

If there is a method to disable/enabled flows within Node-RED (using a special node), this would be sufficient, too.

---

<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 February 2021 20:53 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355/4 "2021-02-20T20:53:00Z")

</div>

> [@augjoh](#):
>
> These flows should be selected during startup.

How are you proposing that that they are selected during startup? At what point during startup do you want to be able to select them? Or do you mean you want to select them _before_ startup by setting some configuration or similar.

---

<div class="post-metadata">

### Author: ![grawsom](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grawsom/32/53070_2.png) [@grawsom](https://discourse.nodered.org/u/grawsom)
#### Post date: [23 February 2021 11:26 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355/5 "2021-02-23T11:26:17Z")

</div>

Your aware off Enable/Disable for the flow (double click on flow tab) select Enable/Disable i buttom left (RadioButton)

---

<div class="post-metadata">

### Author: ![augjoh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/augjoh/32/26464_2.png) [@augjoh](https://discourse.nodered.org/u/augjoh)
#### Post date: [27 February 2021 06:16 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355/6 "2021-02-27T06:16:40Z")

</div>

@Colin Currently there is the setting `disableFlows` in `settings.js`. It takes the values `true` and `false`. I think this should be modified, that is takes an array of strings and regex, too. For example:

```auto
disableFlows = [/^Development.*/, 'Feature X'];

```

When Node-RED starts, it should iterate over all flows and disable all flows, which names match the regular expressions or have a name equal to the string value.

---

<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: [28 April 2021 06:16 UTC](https://discourse.nodered.org/t/disabling-flows-during-startup/41355/7 "2021-04-28T06:16:50Z")

</div>

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