Self-hosted server setup - storage in filesytem

I am attempting to set up joplin server. My environment is as follows:

Ubuntu server v 20.04.4 LTS
Server version - 2.7.4
Docker - joplin/server:latest

I have successfully set up a locally hosted server with items stored in the database and have successfully synced to the server. I am however having difficulties setting up for storage outside the database.

Based on my reading of the instructions here I am aware that I need to add an environment variable (which I will add to the .env file) as follows:

STORAGE_DRIVER=Type=Filesystem; Path=/path/to/dir

I am however unsure what to set as the Path in the above.

From this forum post I have gathered that the filesystem path refers to the filesystem of the container. If this is the case I am unsure of what would be a suitable path to use. Will the directory I specify be created in the container if it doesn't already exist or does an existing directory have to be used?

Assuming that the above path is indeed to the filesystem of the container, I assume a bind mount is needed for the app to map the server path to the container path.

I seem to have reached the extent of my basic working knowledge of Docker and any suggestions are greatly appreciated.

Unfortunately I was unable to make the filesystem storage driver work for me. Perhaps you could try with the same setup and see if it works for you? In any case you'll need to mount host storage (e.g. a bind mount) into the container to store file files, otherwise the files will be lost when the container is recreated.

Again it's not working for me, so take my advice with a grain of salt. But I think the path /mnt/files inside the environment variable STORAGE_DRIVER=Type=Filesystem; Path=/mnt/files is local to the container. And you'd have to mount a directory form the host to this path, like so:

      - /mnt/docker/joplin:/mnt/files

It was a mistake on my end, it's working for me now. You may use the updated compose file as an example :slight_smile:

Thanks for your input. My issues boiled down to permissions. Once I set ownership of the directory on the server to 1001 it worked as expected.

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