Joplin Server on Synology with Docker and Portainer


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'

        image: postgres:latest
        container_name: postgres
        network_mode: bridge
            - /volume1/docker/joplin/joplin-data:/var/lib/postgresql/data
            - "5435:5432"
        restart: unless-stopped
            - APP_PORT=22300
            - POSTGRES_PASSWORD=joplin
            - POSTGRES_USER=joplin
            - POSTGRES_DB=joplin
        image: joplin/server:latest
            - db
        network_mode: bridge
            - "22300:22300"
        restart: unless-stopped
            - APP_BASE_URL=
            - 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 (<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.


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.