Joplin w/ Docker

Operating system

Linux

Joplin version

3.7.1

Sync target

Joplin Server

What issue do you have?

Howdy, folks.

I upgraded my NAS from a 10 year-old Qnap (yikes!) to a new UGREEN 4800 Pro. I've installed Docker and prefer to use MySQL (MariaDB) because it's more familiar to me. Yes, I understand that Maria is not officially supported, but I figured it was worth a shot.

It seems everything is up and running, but there are a couple things I could use some guidance on how to clean up my mess.

Warning: I'm a novice (at best!) where 'ix is concerned, and this is my first experience with Docker, so my comprehension of folder structure, containers, compose files and 'ix in general is weak. Please be kind. :wink:

  1. I do not see the Joplin DB in phpMyAdmin. I suspect that's because I installed one version of Maria (11.8) and Joplin is looking for 11 as I followed old instructions from a 3rd party source (see compose file and screen shots below)

  2. I'm having trouble synchronizing the Joplin app (android) to my server on my local network. I activated https:// using the UGREEN-provided SSL cert, but in the long term I'm guessing that will have to change. I'm not entirely comfortable with someone else's cert.

A diagnosis and a few pointers would be greatly appreciated!

Compose file:

version: "3.8"

services:
mariadb:
image: mariadb:11
container_name: joplin-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: xxxx
MYSQL_DATABASE: joplin
MYSQL_USER: joplin
MYSQL_PASSWORD: xxxx
TZ: America/New_York
command:

  • --character-set-server=utf8mb4
  • --collation-server=utf8mb4_unicode_ci
    volumes:
  • /volume1/docker/joplin/db:/var/lib/mysql

joplin:
image: joplin/server:latest
container_name: joplin-server
restart: unless-stopped
depends_on:

  DB_CLIENT: mysql
  POSTGRES_PASSWORD: xxxx

  MYSQL_DATABASE: xxxx
  MYSQL_USER: xxxx
  MYSQL_PASSWORD: xxxx
  MYSQL_PORT: 3306
  MYSQL_HOST: mariadb

  TZ: America/New_York

volumes: {}

Screenshots

I'm surprised it would work at all since there are lots of specific code for Postgres, some for SQLite, and none for MySQL. You might want to check the log when the server starts for any error

Perhaps I mis-spoke. As you can see, I was referring to MariaDB, but you've successfully revealed my ignorance of the nuances between that, Postgres and others.

But MariaDB is a fork of MySQL, right? So I mean we don't support any MySQL-compatible backend, including MariaDB

Based on the relevant code, if DB_CLIENT is not pg, Joplin Server uses SQLite. It's likely that Joplin Server is using the SQLite backend and not MariaDB.

Got it. So, if I use an updated compose file, do I still need to install Postgres manually, or will that be installed as a dependency automatically by my NAS?

Yes it would be installed automatically. All images referenced in the Docker Compose file will be installed