# Restart flow with button from dashboard

**URL:** https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567
**Category:** General
**Tags:** node-red-dashboard
**Created:** [14 November 2022 10:04 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567 "2022-11-14T10:04:03Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)
#### Post date: [14 November 2022 10:04 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/1 "2022-11-14T10:04:03Z")

</div>

Hi everyone, I have a question how can I restart a flow through a button in the dashboard?  
thank you all

![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a370e114cd0d7bca0a0267ecca1bcf6a8de23d89.png)

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [14 November 2022 10:48 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/2 "2022-11-14T10:48:55Z")

</div>

Hi.

Sorry, but I have to ask....

What do yo mean: `Restart the flow`?

---

<div class="post-metadata">

### Author: ![Giacomo23](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@Giacomo23](https://discourse.nodered.org/u/Giacomo23)
#### Post date: [14 November 2022 10:51 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/3 "2022-11-14T10:51:16Z")

</div>

I have to modify the flows.json file and to apply the changes I have to restart the flow

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [14 November 2022 10:53 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/4 "2022-11-14T10:53:01Z")

</div>

Why are you modifying the `flows.json` file?  
(More so)  
HOW are you modifying it?

Normally it is via the editor/GUI and so there is nothing to do.  
You press the `DEPLOY` button and that's it.  
Oh, ok. You say **From the dashboard**.

Ok, above my skill set.  
Sorry.

---

<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: [14 November 2022 14:41 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/6 "2022-11-14T14:41:18Z")

</div>

As @Trying_to_learn says, a key question is how are you updating the flow file?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [14 November 2022 19:32 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/7 "2022-11-14T19:32:50Z")

</div>

@Giacomo23 just as an option which should work, but is brute force:

After you modify the `flows.json` file and need to _restart_ the flow:

`exec` node and issue the command:  
`node-red-restart`

It won't be quite that simple - paths, etc.

But: at a pinch it would do what you want.  
However, I think it is problematic in ways you haven't thought.

---

<div class="post-metadata">

### Author: ![fabi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fabi/32/76122_2.png) [@fabi](https://discourse.nodered.org/u/fabi)
#### Post date: [15 December 2022 08:26 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/8 "2022-12-15T08:26:09Z")

</div>

You could also use the Admin API. For this, you first have to create an authentification key, then you can POST to /flows to restart every flow. To to this you have to define "reload" as the deployment type in the Header. Unfortunatly i don´t know how to restart an individual flow, as far as i know it is only possible to restart all at once. You can look it up here: [POST /flows : Node-RED (nodered.org)](https://nodered.org/docs/api/admin/methods/post/flows/)

---

<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: [13 February 2023 08:26 UTC](https://discourse.nodered.org/t/restart-flow-with-button-from-dashboard/70567/9 "2023-02-13T08:26:56Z")

</div>

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