# Node-RED in Docker without a volume

**URL:** https://discourse.nodered.org/t/node-red-in-docker-without-a-volume/16888
**Category:** General
**Created:** [19 October 2019 16:41 UTC](https://discourse.nodered.org/t/node-red-in-docker-without-a-volume/16888 "2019-10-19T16:41:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mode](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mode/32/49536_2.png) [@mode](https://discourse.nodered.org/u/mode)
#### Post date: [19 October 2019 16:41 UTC](https://discourse.nodered.org/t/node-red-in-docker-without-a-volume/16888/1 "2019-10-19T16:41:32Z")

</div>

Hi,  
i created a docker container like this:

```auto
docker run -it -p 1880:1880 --name mynodered nodered/node-red

```

A few weeks later i did an update:

```auto
$ docker stop mynodered
$ docker pull nodered/node-red
Using default tag: latest
latest: Pulling from nodered/node-red
e7c96db7181b: Already exists
50958466d97a: Already exists
56174ae7ed1d: Already exists
284842a36c0d: Already exists
0c3316b612fe: Pull complete
e9f5ccb645dd: Pull complete
55e46432ee13: Pull complete
38f90a832f08: Pull complete
3e66eb0d1a9d: Pull complete
58f99330384f: Pull complete
Digest: sha256:086ccdefd0adddd9a677b366b562af4daaf89a5c5eb9cdb76baef145c190b7d9
Status: Downloaded newer image for nodered/node-red:latest
$ docker start mynodered

```

Since i have no Docker Volume or ext. Mount i expected my data in /data to be overwritten. But all my flows are still there. Can someone explain to me why this is so?

btw: How can i add a docker volume to my existing container? is this possible?  
BR

mode

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [19 October 2019 17:19 UTC](https://discourse.nodered.org/t/node-red-in-docker-without-a-volume/16888/2 "2019-10-19T17:19:20Z")

</div>

The idea of docker is to run the program/software by itself in the container and store any changing/persistent data outside the container. This makes updating/changing the container extremely easy and you found out the hard way that it works like this.

To mount a volume:

```auto
docker run -it -p 1880:1880 -v /home/pi/.node-red:/data --name mynodered nodered/node-red

```

where `/home/pi/.node-red` is your local directory and `/data` is the mounting point in the container (hardcoded and required). So you will be creating a new flow in `/home/pi/.node-red` and updating the container will not affect it.
