Joplin on SQLite

I’ve been using Joplin for a while now, I love it for it’s simplicty, flexibility and focus on privacy.

Using Joplin gives me the freedom to write in private, from anywhere.

But when I deployed the sync server the only suggested database was Postgres. I didn’t want to run a Postgres server just for Joplin, so I started looking for alternatives.

I couldn’t find this documented anywhere when I setup it up, and it works just fine for me, so here it is.

First create your SQLite database and a directory to store it in.

mkdir db
sqlite3 db/joplin.db

Then create a docker-compose.yml file in the same directory as your SQLite database.

services:
  app:
    image: joplin/server:latest
    container_name: joplin
    restart: unless-stopped
    environment:
      - PUID=1002
      - GUID=100
      - APP_PORT=22300
      - APP_BASE_URL=https://your.damain.com
      - DB_CLIENT=sqlite3
      - SQLITE_DATABASE=/db/joplin.db
      - MAILER_ENABLED=1
      - MAILER_HOST=your.smtp.server
      - MAILER_PORT=587
      - MAILER_SECURE=starttls
      - MAILER_AUTH_USER=your@email.com
      - MAILER_AUTH_PASSWORD=yourpassword
      - MAILER_NOREPLY_NAME=Joplin
      - MAILER_NOREPLY_EMAIL=your@email.com
    volumes:
      - ./db:/db
    ports:
      - 22300:22300

Spin up the container and you are done.

docker-compose up -d

May 4, 2025