# Locate and edit settings.js file under Docker

**URL:** <https://discourse.nodered.org/t/locate-and-edit-settings-js-file-under-docker/27643>\
**Category:** General\
**Created:** [1 June 2020 20:14 UTC](https://discourse.nodered.org/t/locate-and-edit-settings-js-file-under-docker/27643 "2020-06-01T20:14:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgibbs99](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@tgibbs99](https://discourse.nodered.org/u/tgibbs99)\
**Post date:** [1 June 2020 20:14 UTC](https://discourse.nodered.org/t/locate-and-edit-settings-js-file-under-docker/27643/1 "2020-06-01T20:14:18Z")

</div>

Several different lines of inquiry have lead to requiring editing the settings.js file. I am not able to locate it. I am running Node-Red under Docker on Raspberry Pi. Search of internet indicates several others are stuck on this as well, and no definitive answer.

Thanks.

Tim

---

<div class="post-metadata">

**Author:** ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)\
**Post date:** [1 June 2020 23:43 UTC](https://discourse.nodered.org/t/locate-and-edit-settings-js-file-under-docker/27643/2 "2020-06-01T23:43:53Z")

</div>

How did you setup your docker instance??

The settings.js file is located where you specified how/where you save your static data.

It is clearly defined here ---\> [https://nodered.org/docs/getting-started/docker](https://nodered.org/docs/getting-started/docker)

" Node-RED uses the `/data` directory inside the container to store user configuration data."  
  
  
I use a Bind Mount. So I start my docker container tied to a directory on my servers hdd for ease of use and backup.

```auto
$ sudo docker run -d --restart always --log-opt max-size=5m --log-opt max-file=10 \
--name=node-red \
-p 1880:1880 \
-e DUID=1000 \
-e DGID=1000 \
-v /home/YourUserDirHere/docker/node-red:/data \
nodered/node-red

```

**The important line is** : -v /home/YourUserDirHere/docker/node-red:/data \

Now in my /home/YourUserDirHere/docker/node-red directory on my hard drive I can edit the settings.js file.

Don't forget to stop the docker instance before editing and then start your docker instance of node-red after the edit.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [2 June 2020 05:03 UTC](https://discourse.nodered.org/t/locate-and-edit-settings-js-file-under-docker/27643/3 "2020-06-02T05:03:37Z")

</div>

You can also edit `settings.js` while Node-RED is running as it's only read on startup. Restart after editing is enough. Of course in this case the bind mount needs to be configured and the docker instance restarted before doing the modifications.

---

<div class="post-metadata">

**Author:** ![michaelblight](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelblight/32/445_2.png) [@michaelblight](https://discourse.nodered.org/u/michaelblight)\
**Post date:** [2 June 2020 11:00 UTC](https://discourse.nodered.org/t/locate-and-edit-settings-js-file-under-docker/27643/4 "2020-06-02T11:00:16Z")

</div>

Are you also using Portainer (highly recommended!)? If so, you can just go to the "Exec Console" under "Quick actions" next to your container. Then you get a terminal window within the container, and from there it will be at "/data/settings.js".

Portainer can also show you the volume mappings in case you no longer remember how it was set up (can be done with Docker commands too, but Portainer simplifies it greatly).

---

<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:** [1 August 2020 11:09 UTC](https://discourse.nodered.org/t/locate-and-edit-settings-js-file-under-docker/27643/5 "2020-08-01T11:09:52Z")

</div>

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