Joplin Server: “WARNING: database “joplin” has a collation version mismatch”

Operating system

Linux

Joplin version

3.4.3

Sync target

Joplin Server

Editor

Markdown Editor

What issue do you have?

I'm running Joplin Server v3.4.3 in a docker container (see compose.yml file below).
docker compose logs -f showed this warning, should I be concerned? Should I run some database commands at the container shell?
This issue has been brought up before, at this thread, but just pulling a new image didn't fix it for me.

joplin_db | 2025-10-20 12:07:37.559 UTC [168] WARNING: database "joplin" has a collation version mismatch
joplin_db | 2025-10-20 12:07:37.559 UTC [168] DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.41.
joplin_db | 2025-10-20 12:07:37.559 UTC [168] HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE joplin REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.

services:

  db:
    image: postgres:16
    container_name: joplin_db
    volumes:
      - joplin:/var/lib/postgresql/data
    networks:
      joplin:
    restart: unless-stopped
    environment:
      - POSTGRES_USER=joplin
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DB=joplin
    labels:
      traefik.enable: false

  joplin:
    image: joplin/server
    container_name: joplin
    depends_on: [db]
    restart: unless-stopped
    networks:
      traefik:
      joplin:
    environment:
      - APP_PORT=22300
      - APP_BASE_URL=${APP_BASE_URL}
      - DB_CLIENT=pg
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_DATABASE=joplin
      - POSTGRES_USER=joplin
      - POSTGRES_PORT=5432
      - POSTGRES_HOST=db
    labels:
      traefik.docker.network: traefik
      traefik.http.routers.joplin.tls: true
      traefik.http.services.joplin.loadbalancer.server.port: 22300

networks:
  traefik:
    external: true
  joplin:
    external: true

volumes:
  joplin:
    name: joplin

Here’s what I did to resolve this issue:

$ docker exec -it joplin-db bash
I have no name!@joplin-db:/$ psql --dbname=joplin --username=postgres --password
Password:
WARNING:  database "joplin" has a collation version mismatch
DETAIL:  The database was created using collation version 2.36, but the operating system provides version 2.41.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE joplin REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
psql (16.10 (Debian 16.10-1.pgdg13+1))
Type "help" for help.

joplin=# REINDEX DATABASE joplin;
WARNING:  database "joplin" has a collation version mismatch
DETAIL:  The database was created using collation version 2.36, but the operating system provides version 2.41.
HINT:  Rebuild all objects in this database that use the default collation and run ALTER DATABASE joplin REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
REINDEX
joplin=# ALTER DATABASE joplin REFRESH COLLATION VERSION;
ALTER DATABASE
joplin=# exit
could not save history to file "//.psql_history": No such file or directory
I have no name!@joplin-db:/$ exit
exit
$ docker compose pull;docker compose down;sleep 4;docker compose up --detach;

Once the system restarted I checked the compose stack logs using docker compose logs to confirm what was happening. Everything seems to be running correctly.

Thank you, it works beautifully!

I’ve made an asciinema video of this solution: ALTER DATABASE joplin REFRESH COLLATION VERSION - asciinema.org