# No persistent saving to docker volumes - jodogne/orthanc-plugins:1.12.4

**URL:** https://discourse.orthanc-server.org/t/no-persistent-saving-to-docker-volumes-jodogne-orthanc-plugins-1-12-4/5649
**Category:** General
**Created:** [March 19, 2025, 3:04pm UTC](https://discourse.orthanc-server.org/t/no-persistent-saving-to-docker-volumes-jodogne-orthanc-plugins-1-12-4/5649 "2025-03-19T15:04:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![CoelnerOrthancUser](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@CoelnerOrthancUser](https://discourse.orthanc-server.org/u/CoelnerOrthancUser)
#### Post date: [March 19, 2025, 3:04pm UTC](https://discourse.orthanc-server.org/t/no-persistent-saving-to-docker-volumes-jodogne-orthanc-plugins-1-12-4/5649/1 "2025-03-19T15:04:54Z")

</div>

I started from a [working docker compose file](https://github.com/orthanc-server/orthanc-setup-samples/tree/master/docker/transcode-middleman) from a official sample. Volume data was persistent accross `docker compose down` and subsequent `docker compose up --build -d` runs:

```
version: "2"
services:
  orthanc-pacs:
    build: orthanc-pacs
    restart: unless-stopped
    ports: ["8042:8042"]
    volumes: ["orthanc-storage-pacs:/var/lib/orthanc/db:Z"]
  orthanc-middleman:
    build: orthanc-middleman
    restart: unless-stopped
    ports: ["8043:8042"]
    volumes: ["orthanc-storage-middleman:/var/lib/orthanc/db:Z"]
  orthanc-modality:
    build: orthanc-modality
    restart: unless-stopped
    ports: ["8044:8042"]
    volumes: ["orthanc-storage-modality:/var/lib/orthanc/db:Z"]
volumes:
  orthanc-storage-pacs:
  orthanc-storage-middleman:
  orthanc-storage-modality:

```

Now I replaced the docker image used in the orthanc containers (to save some memory):

instead of `orthancteam/orthanc` I switched to `jodogne/orthanc-plugins:1.12.4`

now the persistent saving of patient data is not working anymore.

Is there a plugin or configuration I can use to fix the persistent saving to docker volumes?

here my orthanc.json:

```auto

{
  "Name": "Orthanc-modality",
	"RemoteAccessAllowed" : true,
	"AuthenticationEnabled" : true,
	"RegisteredUsers" : {
		"demo": "demo"
	},
  "DicomAet": "MODALITY",
  "DicomModalities": {
      "pacs": ["PACS", "orthanc-pacs", 4242], // to perform query-retrieve on the PACS
      "middleman": ["MIDDLEMAN", "orthanc-middleman", 4242] // used as a C-Store destination
  }
},
  "Plugins" : [
    "/usr/share/orthanc/plugins", "/usr/local/share/orthanc/plugins"
  ]

```

---

<div class="post-metadata">

### Author: ![benjamin.golinvaux](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/benjamin.golinvaux/32/1508_2.png) [@benjamin.golinvaux](https://discourse.orthanc-server.org/u/benjamin.golinvaux)
#### Post date: [March 21, 2025, 11:13am UTC](https://discourse.orthanc-server.org/t/no-persistent-saving-to-docker-volumes-jodogne-orthanc-plugins-1-12-4/5649/2 "2025-03-21T11:13:23Z")

</div>

Hello

This could be related to permissions. By default, the Orthanc Team images run as `root`, if I am not mistaken. If these folders that you’re mapping belong to `root`, the default images from Sébastien, running with user `orthanc`, could have issues using them. That is just an hypothesis.

To check this, I would exec a shell in your container, navigate to `/var/lib/orthanc/db`, and make sure that you can examine the containers of the bound folder from there : that adding a file at that location, from the container, can be seen on the host, and the opposite, and that the container is able to write.

Another quick test you can make is `chmod -R 777` on all of them before starting the compose file.

Let us know how it goes!

HTH

Benjamin

---

<div class="post-metadata">

### Author: ![CoelnerOrthancUser](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/c/bcef8e/32.png) [@CoelnerOrthancUser](https://discourse.orthanc-server.org/u/CoelnerOrthancUser)
#### Post date: [May 28, 2025, 1:07pm UTC](https://discourse.orthanc-server.org/t/no-persistent-saving-to-docker-volumes-jodogne-orthanc-plugins-1-12-4/5649/3 "2025-05-28T13:07:45Z")

</div>

I found the issue. `jodogne/orthanc` uses a different storage location:

```auto
/etc/orthanc/OrthancStorage

```

So the corrected docker-compose.yml should look like this:

```auto
services:
  orthanc-pacs:
    build: orthanc-pacs
    restart: unless-stopped
    ports: ["8042:8042"]
    volumes: ["orthanc-storage-pacs:/etc/orthanc/OrthancStorage:Z"]
  orthanc-middleman:
    build: orthanc-middleman
    restart: unless-stopped
    ports: ["8043:8042"]
    volumes: ["orthanc-storage-middleman:/etc/orthanc/OrthancStorage:Z"]
  orthanc-modality:
    build: orthanc-modality
    restart: unless-stopped
    ports: ["8044:8042"]
    volumes: ["orthanc-storage-modality:/etc/orthanc/OrthancStorage:Z"]
volumes:
  orthanc-storage-pacs:
  orthanc-storage-middleman:
  orthanc-storage-modality:

```

i.e. replacing `/var/lib/orthanc/db` used in the `orthancteam/orthanc` image.

Would be nice if such subtle differences were documented somewhere…

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [May 28, 2025, 2:07pm UTC](https://discourse.orthanc-server.org/t/no-persistent-saving-to-docker-volumes-jodogne-orthanc-plugins-1-12-4/5649/4 "2025-05-28T14:07:21Z")

</div>

> [@CoelnerOrthancUser](#):
>
> Would be nice if such subtle differences were documented somewhere…

Just run `docker run -p 8047:8042 jodogne/orthanc`  
and check the logs:

```auto
W0528 14:01:24.921845 MAIN OrthancInitialization.cpp:444] SQLite index directory: "/var/lib/orthanc/db"
W0528 14:01:24.922546 MAIN OrthancInitialization.cpp:543] Storage directory: "/var/lib/orthanc/db"

```

And you’ll realize that the default storage path is `/var/lib/orthanc/db/`.

Then, check your configuration file and you’ll realize that you are the one who is configuring `OrthancStorage` somewhere very likely in your build process since you are building a custom image.

Cheers,

Alain

---

<div class="post-metadata">

### Author: ![benjamin.golinvaux](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/benjamin.golinvaux/32/1508_2.png) [@benjamin.golinvaux](https://discourse.orthanc-server.org/u/benjamin.golinvaux)
#### Post date: [May 30, 2025, 6:27am UTC](https://discourse.orthanc-server.org/t/no-persistent-saving-to-docker-volumes-jodogne-orthanc-plugins-1-12-4/5649/5 "2025-05-30T06:27:18Z")

</div>

Hi @CoelnerOrthancUser

Your confusion might stem from the fact that the default configuration uses the folder names you’ve indicated:

```auto
  // Path to the directory that holds the heavyweight files (i.e. the
  // raw DICOM instances). Backslashes must be either escaped by
  // doubling them, or replaced by forward slashes "/".
  "StorageDirectory" : "OrthancStorage",

  // Path to the directory that holds the SQLite index (if unset, the
  // value of StorageDirectory is used). This index could be stored on
  // a RAM-drive or a SSD device for performance reasons.
  "IndexDirectory" : "OrthancStorage",

```

Orthanc will generate these folders in `/etc/orthanc` if relative paths are computed starting from the folder containing the configuration file…

But please note that the default configuration (the one generated by `Orthanc` when you pass the `--config` flag) is _not_ strictly equivalent to the one used in the `jodogne/orthanc` container.
