Setting up Node-Red in a docker container on Openmediavault 7

Hi there.

I am running OMV7 on my server and running various containers without any issue.

However, I am struggling to get the Node-Red container working, though I had no issue with it on OMV6.

It appears that I might have a permission issue but cannot work out, exactly, what it is.

I am using the following docker compose:

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 am getting the following error:

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

Is there something different about the NR docker that makes it not run out of the box?

Found the solution - I needed to create the "data" folder as appuser (which I use for docker), rather than root.

1 Like

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