# Docker won't start after settings.json changes

**URL:** <https://discourse.nodered.org/t/docker-wont-start-after-settings-json-changes/66363>\
**Category:** General\
**Created:** [12 August 2022 13:20 UTC](https://discourse.nodered.org/t/docker-wont-start-after-settings-json-changes/66363 "2022-08-12T13:20:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dereckradford](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@dereckradford](https://discourse.nodered.org/u/dereckradford)\
**Post date:** [12 August 2022 13:20 UTC](https://discourse.nodered.org/t/docker-wont-start-after-settings-json-changes/66363/1 "2022-08-12T13:20:55Z")

</div>

I was trying to enable HTTPS on the container and didn't realize that the container couldn't access the host file system. Noob mistake and still learning docker. I am trying to copy the files from container to the host and back, but I can't determine the directory structure.

I have tried sudo docker cp dockerid:/data/settings.js but it says not found is there something I am missing or is the folder structure different?

Thanks,  
Dereck

---

<div class="post-metadata">

**Author:** ![LosinIt](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@LosinIt](https://discourse.nodered.org/u/LosinIt)\
**Post date:** [12 August 2022 15:17 UTC](https://discourse.nodered.org/t/docker-wont-start-after-settings-json-changes/66363/2 "2022-08-12T15:17:03Z")

</div>

> [@dereckradford](#):
>
> is the folder structure different?

Actually it's a separate filesystem. The container is "self contained" and can't "see" the host's filesystem at all by default. You need to tell Docker to map a part of the host's filesystem into the container and you do that by adding a [--volume or --mount](https://docs.docker.com/storage/volumes/) to the "docker run" command you're using. For example, here's one I use:

-v /data/node-red:/data

This tells Docker to map the host's "/data/node-red" path to the container's "/data" path. Then you can go to your host's "/data/node-red" directory and see the same files as the container has in it's "/data" directory, and vice versa.

---

<div class="post-metadata">

**Author:** ![dereckradford](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@dereckradford](https://discourse.nodered.org/u/dereckradford)\
**Post date:** [12 August 2022 16:01 UTC](https://discourse.nodered.org/t/docker-wont-start-after-settings-json-changes/66363/3 "2022-08-12T16:01:23Z")

</div>

Losinit,

I was able to get it working by editing /var/lib/docker/volumes/node-red/\_data/settings.js. I had to disable HTTPS and exclude the certificates that I was trying to do. I had created a let's encrypt ssl in the host and copied the files to /data/fullchain.pem and /data/privkey.pem but for some reason says file cannot be found when docker tries to start.

Thank you for the quick response now to get the next part solved.

---

<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:** [11 October 2022 16:01 UTC](https://discourse.nodered.org/t/docker-wont-start-after-settings-json-changes/66363/4 "2022-10-11T16:01:50Z")

</div>

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