Skip to content

Welcome

meilisync

Realtime change-data-capture from PostgreSQL, MySQL, and MongoDB into Meilisearch.

meilisync tails the source database, maps rows to documents, and keeps indexes up to date — including an optional full backfill on first start.

Get started Install Astrum Agency

What it does

Change data capture

PostgreSQL logical replication (wal2json), MySQL binlog, and MongoDB change streams.

Meilisearch native

Batched inserts, index swap refresh, and a count check against the source.

Stays connected

PostgreSQL reconnects with exponential backoff and resumes from the last LSN.

Plugins

Transform events before and after they are written to Meilisearch.

How it works

flowchart LR
  PG[PostgreSQL] -->|wal2json| M[meilisync]
  MY[MySQL] -->|binlog| M
  MG[MongoDB] -->|change stream| M
  M -->|documents| S[Meilisearch]
  1. On start, each table with full: true is copied into Meilisearch if the index does not exist yet.
  2. Incremental events are applied as they arrive (create / update / delete).
  3. Progress (LSN, binlog file/position, or resume token) is stored in a file or Redis so a restart continues where it left off.

Why this fork

This is a maintained fork of long2ice/meilisync, maintained by Astrum Agency, focused on production PostgreSQL:

  • wal2json format version 2 — one JSON object per change, so large transactions no longer hit PostgreSQL's ~1 GB string-buffer limit
  • Table-filtered decoding via add-tables
  • Automatic reconnect after network drops and server restarts, with resume from the last acknowledged LSN
  • Idle keepalives so dead connections are detected instead of hanging

Quick install

uv pip install "meilisync[postgres]"
pip install "meilisync[postgres]"
docker pull ghcr.io/astrum-studio/meilisync:latest

Then copy config.example.yml to config.yml and run:

meilisync start

See Getting started for a full walkthrough.