Joplin Server on Synology with Docker and Portainer

Hi,

I'm trying to run Joplin Server on my Synology NAS DS920+ with Docker already installed. I'm inexperienced with Docker so I use Portainer to deploy a stack.

version: '3'

services:
    db:
        image: postgres:latest
        container_name: postgres
        network_mode: bridge
        volumes:
            - /volume1/docker/joplin/joplin-data:/var/lib/postgresql/data
        ports:
            - "5435:5432"
        restart: unless-stopped
        environment:
            - APP_PORT=22300
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
    app:
        image: joplin/server:latest
        depends_on:
            - db
        network_mode: bridge
        ports:
            - "22300:22300"
        restart: unless-stopped
        environment:
            - APP_BASE_URL=https://joplin.mydomain.de
            - DB_CLIENT=pg
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_DATABASE=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_PORT=5435
            - POSTGRES_HOST=db

The database was created. The Joplin Container doesn't start correctly. The container starts and shut down immediately.

2022-04-24 18:51:01: App: Starting server v2.7.4 (prod) on port 22300 and PID 7...
Error: The device time drift is 64674ms (Max allowed: 2000ms) - cannot continue as it could cause data loss and conflicts on the sync clients. You may increase env var MAX_TIME_DRIFT to pass the check, or set to 0 to disabled the check.
    at /home/joplin/packages/server/src/app.ts:260:11
    at Generator.next (<anonymous>)
    at fulfilled (/home/joplin/packages/server/dist/app.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Any ideas?

Thanks Nordiger

Hi there,

it looks like it has something to do with the internal clock as the time drift is 64674ms.
You may firstly check if the clock in general is running correctly and select that it should update itself with ntp: Time | DSM - Synology Knowledge Center

Best regards

Hi, this was the resolution. The ntp-option was not set.

Thanks

1 Like

Great, please flag my answer as solution so that others are able to find it faster :smiley:

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