# How to encrypt flow?

**URL:** <https://discourse.nodered.org/t/how-to-encrypt-flow/80581>\
**Category:** General\
**Tags:** security\
**Created:** [15 August 2023 12:25 UTC](https://discourse.nodered.org/t/how-to-encrypt-flow/80581 "2023-08-15T12:25:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![S0T0](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@S0T0](https://discourse.nodered.org/u/S0T0)\
**Post date:** [15 August 2023 12:25 UTC](https://discourse.nodered.org/t/how-to-encrypt-flow/80581/1 "2023-08-15T12:25:47Z")

</div>

Is it possible to encrypt the flow? My goal is to prevent reading and editing of the flow. So encrypt individual json files with the project.

---

<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:** [15 August 2023 12:39 UTC](https://discourse.nodered.org/t/how-to-encrypt-flow/80581/2 "2023-08-15T12:39:58Z")

</div>

Do you mean that you want to prevent others who have access to the computer that node-red is installed on from viewing the data? If not that then what exactly?

---

<div class="post-metadata">

**Author:** ![S0T0](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@S0T0](https://discourse.nodered.org/u/S0T0)\
**Post date:** [15 August 2023 12:55 UTC](https://discourse.nodered.org/t/how-to-encrypt-flow/80581/3 "2023-08-15T12:55:14Z")

</div>

Anyone who has access to the computer where NodeRED is installed. That is, both to the browser (user and password) and especially to the directory structure (hard drive, SD card)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [15 August 2023 15:06 UTC](https://discourse.nodered.org/t/how-to-encrypt-flow/80581/4 "2023-08-15T15:06:48Z")

</div>

Hi @S0T0

It is not possible, or practical, to encrypt the flows in a way that would be secure.

Even if they were encrypted on disk, the key to decrypt them has to be stored somewhere that Node-RED can access. If someone has access to the file system they will have access to the decryption key

---

<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:** [15 August 2023 16:03 UTC](https://discourse.nodered.org/t/how-to-encrypt-flow/80581/5 "2023-08-15T16:03:27Z")

</div>

It may be possible to do as long as Node-RED is running using its own user and group. However, I think you would need to have a specialist keystore and would be encrypting a section of the filing system so would be outside of Node-RED itself. And even then, it isn't 100% secure since, at least in theory, the data could be hacked out of live memory and that probably isn't that hard for a node.js live service. Would at least protect the data in files from accidental access.

Never implemented it myself though, you would probably need to hire a specialist to design it for you.

---

<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:** [14 October 2023 16:03 UTC](https://discourse.nodered.org/t/how-to-encrypt-flow/80581/6 "2023-10-14T16:03:35Z")

</div>

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