Having trouble running NR as a docker on OMV7

Evening all.

I am having trouble running Node-Red on the latest version of Openmediavault (7), as a docker container.

I am using the following docker compose file:

services:
  node-red:
    image: nodered/node-red:latest
    user: 1001:100
    environment:
      - TZ=Europe/London
    ports:
      - "1880:1880"
    volumes:
      - /srv/dev-disk-by-uuid-85c4513d-cfd9-4134-ad11-5d6552e81a81/appdata/node-red/data:/data

but keep getting this docker error when I try to run it:

node-red-1  | node:fs:3035
node-red-1  |   binding.copyFile(
node-red-1  |           ^
node-red-1  | 
node-red-1  | Error: EACCES: permission denied, copyfile '/usr/src/node-red/node_modules/node-red/settings.js' -> '/data/settings.js'
node-red-1  |     at Object.copyFileSync (node:fs:3035:11)
node-red-1  |     at copyFile (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:64:6)
node-red-1  |     at onFile (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:50:25)
node-red-1  |     at getStats (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:42:44)
node-red-1  |     at Object.copySync (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:32:10)
node-red-1  |     at Object.<anonymous> (/usr/src/node-red/node_modules/node-red/red.js:148:20)
node-red-1  |     at Module._compile (node:internal/modules/cjs/loader:1469:14)
node-red-1  |     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
node-red-1  |     at Module.load (node:internal/modules/cjs/loader:1288:32)
node-red-1  |     at Module._load (node:internal/modules/cjs/loader:1104:12) {
node-red-1  |   errno: -13,
node-red-1  |   code: 'EACCES',
node-red-1  |   syscall: 'copyfile',
node-red-1  |   path: '/usr/src/node-red/node_modules/node-red/settings.js',
node-red-1  |   dest: '/data/settings.js'
node-red-1  | }
node-red-1  | 
node-red-1  | Node.js v20.17.0
node-red-1  | node:fs:3035
node-red-1  |   binding.copyFile(
node-red-1  |           ^
node-red-1  | 
node-red-1  | Error: EACCES: permission denied, copyfile '/usr/src/node-red/node_modules/node-red/settings.js' -> '/data/settings.js'
node-red-1  |     at Object.copyFileSync (node:fs:3035:11)
node-red-1  |     at copyFile (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:64:6)
node-red-1  |     at onFile (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:50:25)
node-red-1  |     at getStats (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:42:44)
node-red-1  |     at Object.copySync (/usr/src/node-red/node_modules/fs-extra/lib/copy/copy-sync.js:32:10)
node-red-1  |     at Object.<anonymous> (/usr/src/node-red/node_modules/node-red/red.js:148:20)
node-red-1  |     at Module._compile (node:internal/modules/cjs/loader:1469:14)
node-red-1  |     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
node-red-1  |     at Module.load (node:internal/modules/cjs/loader:1288:32)
node-red-1  |     at Module._load (node:internal/modules/cjs/loader:1104:12) {
node-red-1  |   errno: -13,
node-red-1  |   code: 'EACCES',
node-red-1  |   syscall: 'copyfile',
node-red-1  |   path: '/usr/src/node-red/node_modules/node-red/settings.js',
node-red-1  |   dest: '/data/settings.js'
node-red-1  | }
node-red-1  | 
node-red-1  | Node.js v20.17.0

END OF LINE
█

Any pointers, on how to get things running, would be much appreciated.

Folder permissions need to match user 100 I would guess.

Basically folder permission issue

1 Like

Thank you.

I followed the OMV guide, re setting up docker, and created a dedicated user called “appuser” and gave full control to all the folders that any docker might use.

It has worked perfectly, until, now but I cannot quite understand how a permission issue has arisen.

When did this become the omv or docker or node red forum?

Bit harsh but point taken.

I just thought it likely that someone else might be using Node-Red, on a Debian system, to control their automations.

1 Like

I managed to find a solution.

Just in case it helps anyone else - the “data” folder needs to be created by the docker user and not root.