Setting server to use Filesystem target still uses DB

I'm setting up a self-hosted copy of Joplin Server, and running into a bit of an issue. I'm following along this guide, and setting the STORAGE_DRIVER=Type=Filesystem; Path=/path/to/dir environment variable. I've changed the path to match what I need, but it's still using the PostGres DB to store files, as I don't see content syncing to the location I've provided.

Running Joplin Server on Debian 10 server (via Docker)

My .env file:

APP_BASE_URL=https://notes.my.domain
APP_PORT=22300
DB_CLIENT=pg
POSTGRES_PASSWORD=joplin
POSTGRES_DATABASE=joplin
POSTGRES_USER=joplin
POSTGRES_PORT=5432
POSTGRES_HOST=localhost
STORAGE_DRIVER=Type=Filesystem; Path=/my/own/folder

My docker-compose file:

version: '3'

services:
    db:
        image: postgres:13
        volumes:
            - ./data/postgres:/var/lib/postgresql/data
        ports:
            - "5432:5432"
        restart: unless-stopped
        environment:
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_DB=${POSTGRES_DATABASE}
    app:
        image: joplin/server:latest
        depends_on:
            - db
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - APP_BASE_URL=${APP_BASE_URL}
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
            - POSTGRES_DATABASE=${POSTGRES_DATABASE}
            - POSTGRES_USER=${POSTGRES_USER}
            - POSTGRES_PORT=${POSTGRES_PORT}
            - POSTGRES_HOST=db

I've tried adding the needed variable to the docker-compose file as well, but it results in an error as below:

ERROR: yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "./docker-compose.yaml", line 31, column 1

What am I doing wrong here? I have the server up and running, and can pull and sync data from the Joplin desktop app on my Win10 machine. My external URL is also fully functional.

Unless I am completely mistaken, the filesystem is local to the container. Thus you will need another bind mount for the app.

In the app section of the compose file, add the following under image:

        volumes:
            - /dir/on/server:/my/own/folder
1 Like
ERROR: yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "./docker-compose.yaml", line 31, column 1

Just a guess but do you have a line at the end (line 31?) of your docker-compose.yaml file that starts with a tab? (or is just a tab all on its own).

A YAML file use spaces as indentation , you can use 2 or 4 spaces for indentation , but no tab . In other words, tab indentation is forbidden

1 Like

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