# Installing via Docker problems

**URL:** <https://discourse.nodered.org/t/installing-via-docker-problems/3324>\
**Category:** General\
**Created:** [21 September 2018 08:35 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324 "2018-09-21T08:35:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![christianwaite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christianwaite/32/2724_2.png) [@christianwaite](https://discourse.nodered.org/u/christianwaite)\
**Post date:** [21 September 2018 08:35 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/1 "2018-09-21T08:35:35Z")

</div>

Hi. I've just moved from a RPi running HassOS for Home-Assistant which had everything setup lovely to going it on my own with Ubuntu18.04 headless server with docker-compose/portainer.

I have everything setup apart from Node-Red and could do with a bit of help debugging.  
This is my compose file relevant to node-red:

```
node-red:
    container_name: Node-Red
    image: nodered/node-red-docker
    ports:
      - 1880:1880
    volumes:
      - /opt/node-red:/data:rw
    restart: "no"
    depends_on:
      - mosquitto
      - homeassistant

```

It's failing on basically everything:  
[https://pastebin.com/qcbHCHwR](https://pastebin.com/qcbHCHwR)

Thank you in advance if anyone has any advice.  
Christian

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 September 2018 09:13 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/2 "2018-09-21T09:13:58Z")

</div>

While not a docker expert by any means (I haven't used it) I do notice in your error log that you are tunning node.js v3.10.10 which is so old. Version 4 is end of life.

Notice the line: `npm ERR! Make sure you have the latest version of node.js and npm installed.`

I would start by upgrading node.js

---

<div class="post-metadata">

**Author:** ![christianwaite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christianwaite/32/2724_2.png) [@christianwaite](https://discourse.nodered.org/u/christianwaite)\
**Post date:** [21 September 2018 15:30 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/3 "2018-09-21T15:30:39Z")

</div>

Hi, thanks for your reply.  
I don't control that, it's in the docker, so there's something wrong there.

I got it working using the image:  
nodered/node-red-docker:latest

Although I also tried a few others like:  
nodered/node-red-docker:v8

Which didn't work.  
Thanks anyway, I'm going to go experiment.  
Christian

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 September 2018 21:03 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/4 "2018-09-21T21:03:39Z")

</div>

I have just looked at the docker files - you might want to be careful - there is a couple of threads (as yet unresolved) about NR failing to upgrade/install with 19.4

I note that the docker image has that in there in the json file.

If i have time later today i will give it a go and see what happens on a Docker host i run

Craig

---

<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:** [21 September 2018 21:40 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/5 "2018-09-21T21:40:20Z")

</div>

> [@craigcurtin](#):
>
> have just looked at the docker files - you might want to be careful - there is a couple of threads (as yet unresolved) about NR failing to upgrade/install with 19.4

That is entirely unrelated.

@christianwaite the very first error in the log is:

```
Error: EACCES: permission denied, open '/data/settings.js'

```

Its failing to access the settings file from the volume you've mounted. Check its permissions etc. Have a Google for permissions issues with docker volumes... It's a common thing.

---

<div class="post-metadata">

**Author:** ![christianwaite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christianwaite/32/2724_2.png) [@christianwaite](https://discourse.nodered.org/u/christianwaite)\
**Post date:** [21 September 2018 22:20 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/6 "2018-09-21T22:20:03Z")

</div>

Thanks @knolleary for pointing me in the right direction.  
Every other docker hasn't had a problem, but I found some information about node-red docker starting up with a different user. Someone updated their fstab to get around it, but I found this solution of setting the user a bit better. All working now (previously I thought it was a version thing, but I'd also disabled the volumes as well, which was actually the problem).

This is now my docker-compose:  
node-red:  
container\_name: Node-Red  
image: nodered/node-red-docker:latest  
ports:  
- 1880:1880  
user: '1000'  
volumes:  
- /opt/node-red:/data  
depends\_on:  
- homeassistant

Thanks for the tip  
Christian

---

<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:** [21 September 2018 22:24 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/7 "2018-09-21T22:24:15Z")

</div>

Great - glad you got it working.

Have to admit, I'm not as well versed in docker as I should be. Open to feedback on improvements we could make to fit in better with whatever the current widely accepted best practice is.

---

<div class="post-metadata">

**Author:** ![christianwaite](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christianwaite/32/2724_2.png) [@christianwaite](https://discourse.nodered.org/u/christianwaite)\
**Post date:** [21 September 2018 22:27 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/8 "2018-09-21T22:27:57Z")

</div>

I'm very new to it, so I don't have much of a clue myself, but I'd maybe give an example of docker-compose like I've posted as that seems to be the easiest way to get everything going in my opinion.

---

<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:** [21 September 2018 22:28 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/9 "2018-09-21T22:28:57Z")

</div>

Don't think we have anything about compose in the repo or docs, so would be a good contribution if anyone is willing.

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 September 2018 22:30 UTC](https://discourse.nodered.org/t/installing-via-docker-problems/3324/10 "2018-09-21T22:30:23Z")

</div>

Nick,

One of the key things would be to pass in the UID/GID of the user that you want to run the docker as - this then resolves issues with the mount of the external filesystem

Here is an example of one i use that supports this

[https://hub.docker.com/r/linuxserver/sonarr/](https://hub.docker.com/r/linuxserver/sonarr/)

P.S. I have been working with Docker for about a year now and use it farily extensively for a lot of tasks at home - happy to help out/get involved

regards

Craig
