# Set secret key of “encrypt node” from flow or global variable in node red

**URL:** https://discourse.nodered.org/t/set-secret-key-of-encrypt-node-from-flow-or-global-variable-in-node-red/40729
**Category:** General
**Created:** [10 February 2021 08:17 UTC](https://discourse.nodered.org/t/set-secret-key-of-encrypt-node-from-flow-or-global-variable-in-node-red/40729 "2021-02-10T08:17:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![karthiksuresh6666](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/karthiksuresh6666/32/36861_2.png) [@karthiksuresh6666](https://discourse.nodered.org/u/karthiksuresh6666)
#### Post date: [10 February 2021 08:17 UTC](https://discourse.nodered.org/t/set-secret-key-of-encrypt-node-from-flow-or-global-variable-in-node-red/40729/1 "2021-02-10T08:17:36Z")

</div>

How can we set the flow/global variable value to secret key in "Encrypt Node".

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

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [10 February 2021 08:46 UTC](https://discourse.nodered.org/t/set-secret-key-of-encrypt-node-from-flow-or-global-variable-in-node-red/40729/2 "2021-02-10T08:46:24Z")

</div>

unless the node allows it you probably can't. But you can maybe use an environment variable - [Using environment variables : Node-RED](https://nodered.org/docs/user-guide/environment-variables)

---

<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: [18 February 2021 23:18 UTC](https://discourse.nodered.org/t/set-secret-key-of-encrypt-node-from-flow-or-global-variable-in-node-red/40729/3 "2021-02-18T23:18:55Z")

</div>

As long as you remember that environment variables are, in no way "secure". They are simply less visible. 😉

---

<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 April 2021 23:19 UTC](https://discourse.nodered.org/t/set-secret-key-of-encrypt-node-from-flow-or-global-variable-in-node-red/40729/4 "2021-04-19T23:19:42Z")

</div>

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