Docker server deletes all data when NAS reboots. (Postgres storage volume is outside the container.)

Operating system

Linux

Joplin version

2.20.2

Sync target

Joplin Server

What issue do you have?

I am running a Joplin docker server on an Asustor NAS.
Users are created, syncing works perfectly.
When the NAS reboots all data is lost, and the server reverts to default login.
The compose file is based very much on the example on github.
The db volume is working. I can enter the container console and verify that the postgres files are on the NAS file system.
db:
image: postgres:16
volumes:
- ./data/postgres:/var/lib/postgresql/data

What needs to be done to make the Joplin server data persistent?

The volumes: statement was wrong. The statement I used, from numerous example compose files, did not work in Portainer. I suspect that it does work using docker commandline tools. In portainer the data was in the correct place and persistent (on my Asustor NAS) using:
volumes:
- /volume1/docker/joplin/data/postgres:/var/lib/postgresql/data

1 Like

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