# Node-red does not run on IoT Edge module on a Windows device

**URL:** <https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641>\
**Category:** Industrial\
**Created:** [15 November 2022 11:34 UTC](https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641 "2022-11-15T11:34:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![arseny-sandaar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arseny-sandaar/32/68322_2.png) [@arseny-sandaar](https://discourse.nodered.org/u/arseny-sandaar)\
**Post date:** [15 November 2022 11:34 UTC](https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641/1 "2022-11-15T11:34:17Z")

</div>

Hi there,

I am trying to deploy node-red on IoT edge device installed on Windows device (bash).

IoT edge device is succesfully installed on Windows device following the manual from Microsoft.

On my IoT edge device I am trying to deploy node-red similar to Raspberry Pi as discussed [here](https://github.com/iotblackbelt/noderededgemodule?ysclid=lai3tu3gk3896440846).

I already had problem when deploying on Raspberry Pi and solved it with the help of the community: [here](https://discourse.nodered.org/t/docker-gives-error-eacces-permission-denied-copyfile-data-settings-js/68285), you will also find my old question on stackoverflow.  
The error is similar, so I thought the problem might be in

```auto
  "Binds": [
        "/node-red:/data"
    ],

```

which I changed to

```auto
"Binds": [
            "/home/iotedge-user/node-red:/data"
        ],

```

(in the case of Raspberry Pi instead of `iotedge-user` was `pi`).  
And I still have this error logs:

```auto
Error: EACCES: permission denied, lstat '/data/settings.js'
    at Object.lstatSync (node:fs:1529:3)
    at Object.lstatSync (/usr/src/node-red/node_modules/graceful-fs/polyfills.js:318:34)
    at statFunc (/usr/src/node-red/node_modules/fs-extra/lib/util/stat.js:24:20)
    at getStatsSync (/usr/src/node-red/node_modules/fs-extra/lib/util/stat.js:27:16)
    at Object.checkPathsSync (/usr/src/node-red/node_modules/fs-extra/lib/util/stat.js:67:33)
    at Object.copySync (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:27:38)
    at Object.<anonymous> (/usr/src/node-red/node_modules/node-red/red.js:129:20)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32) {
  errno: -13,
  syscall: 'lstat',
  code: 'EACCES',
  path: '/data/settings.js'
}

```

Here is the system information:

```auto
Icon name: computer-vm
         Chassis: vm 🖴
      Machine ID: e32db979ebe04313a64c390f6d3b20d7
         Boot ID: 6c5236241c5b4a799fef72c6d9d1724a
  Virtualization: microsoft
Operating System: CBL-Mariner/Linux
          Kernel: Linux 5.15.67.1-4.cm2
    Architecture: x86-64
 Hardware Vendor: Microsoft Corporation
  Hardware Model: Virtual Machine

```

The docker image for the node-red: `nodered/node-red:latest` as in Raspberry Pi ARM32v7.

Let's find out the issue together 🙂

---

<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 November 2022 18:18 UTC](https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641/2 "2022-11-15T18:18:53Z")

</div>

Never used Azure IoT Edge but it says that the modules are Docker compatible containers. So if you want to run on a Windows host, I'm guessing that the container will be a Windows container not a Linux one and if so, you would need to build your own custom Windows node-red container?

---

<div class="post-metadata">

**Author:** ![arseny-sandaar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arseny-sandaar/32/68322_2.png) [@arseny-sandaar](https://discourse.nodered.org/u/arseny-sandaar)\
**Post date:** [16 November 2022 13:15 UTC](https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641/3 "2022-11-16T13:15:56Z")

</div>

[Here](https://learn.microsoft.com/en-us/azure/iot-edge/iot-edge-for-linux-on-windows?view=iotedge-2018-06) they say that Azure IoT Edge for Linux on Windows (EFLOW) allows you to run containerized Linux workloads alongside Windows applications in Windows deployments.  
So as far as I understand it is a virtual machine on Windows. I managed to deploy two containers: one with edgeHub and the other with edgeAgent. However, it does not work for the node-red.

---

<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:** [16 November 2022 14:10 UTC](https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641/4 "2022-11-16T14:10:38Z")

</div>

OK, my assumption was wrong then. Couldn't tell from a quick view and that seemed like a possibility.

Can you get a remote shell to the node-red container? If so, you can check the permissions for the data container directly.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [18 November 2022 10:18 UTC](https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641/5 "2022-11-18T10:18:53Z")

</div>

Answered on Stack Overflow here

> <https://stackoverflow.com/questions/74487200/can-i-run-node-red-under-docker-on-vm-eflow-azure-iot-edge-on-windows-device/74488060#74488060>

---

<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:** [2 December 2022 10:19 UTC](https://discourse.nodered.org/t/node-red-does-not-run-on-iot-edge-module-on-a-windows-device/70641/6 "2022-12-02T10:19:06Z")

</div>

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