Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Postgres Sync

lanjaklanjak15 downloads

Syncs this vault to a self-hosted Postgres database (via PostgREST) instead of Sync or CouchDB - every note is embedded for semantic search from agent tooling too.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates1

Sync your Obsidian vault across devices using a self-hosted Postgres database instead of Obsidian Sync, iCloud, or a CouchDB setup. Every note also gets embedded, so the same table doubles as a semantic search index you can query from outside Obsidian.

What you need

  • A Postgres instance (with the pgvector extension available) reachable from every device you want to sync, fronted by PostgREST - Obsidian mobile can't open a raw database connection, so PostgREST is what actually speaks HTTP to the plugin.
  • An embedding server that speaks the llama.cpp /embedding endpoint, also reachable from every device. Point it at any embedding model you like; 768-dim models are the default assumption in sql/schema.sql, but you can change the embedding column's dimension to match whatever you run (do this before first use - see the comment in that file).
  • The schema in sql/schema.sql applied to your Postgres database, with a real API key set in app_settings.bearer_token, and PostgREST configured to use it (see below).

Obsidian Sync, CouchDB, Syncthing - none of that is needed. This plugin talks to PostgREST directly over HTTP or HTTPS from inside Obsidian, so it works on desktop and mobile.

Setting up the backend

  1. Create a Postgres database and run sql/schema.sql against it:

    psql "postgres://user:pass@your-host:5432/your-db" -f sql/schema.sql
    
  2. Set a real API key (the seeded default is change-me, don't leave it) and a login password for the authenticator role:

    update app_settings set bearer_token = 'a long random key of your choosing';
    alter role authenticator with login password 'a real password';
    
  3. Run PostgREST pointed at the same database, connecting as authenticator, with:

    • db-anon-role = web_anon
    • db-pre-request = public.check_bearer_token

    The plugin sends its key as an X-Api-Key header, not Authorization - PostgREST reserves Authorization for its own JWT handling, so a custom header is what check_bearer_token() actually checks.

    Don't set PostgREST's max-rows below 100, or the plugin's pull (which pages in batches of 100) will silently stop early.

Install the plugin

Manually:

  1. Download main.js and manifest.json from the latest release.
  2. Drop them into <your vault>/.obsidian/plugins/postgres-sync/.
  3. Enable community plugins in Obsidian, then enable "Postgres Sync".

Setup

Open the plugin settings and fill in:

  • PostgREST URL - your PostgREST instance's address.
  • API key - the key you set in app_settings.bearer_token.
  • Embedding server URL - your llama.cpp embedding server's address.
  • Embed API key - optional, only needed if your embedding server requires auth.

Do this on every device you want synced, pointing at the same PostgREST instance. First sync on a new device, run the "Pull changes from Postgres now" command to pull everything down.

How sync works, briefly

Last-write-wins by modification time. No conflict resolution beyond that, so if you edit the same note offline on two devices at once, whichever save lands later wins. Fine for a single person across a few devices; not built for real-time collaborative editing.

License

MIT

HealthExcellent
ReviewPassed
About
Sync your Obsidian vault across devices through a self-hosted Postgres database accessed via PostgREST. Embed each note into a vector column so the same table doubles as a semantic search index you can query outside Obsidian. Work on desktop and mobile over HTTP(S).
SyncingIntegrations
Details
Current version
0.1.0
Last updated
2 weeks ago
Created
2 weeks ago
Updates
1 release
Downloads
15
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
lanjaklanjak
GitHublanjak
  1. Community
  2. Plugins
  3. Syncing
  4. Postgres Sync

Related plugins

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Self-hosted LiveSync

Sync vaults securely to self-hosted servers or WEBRTC.

Google Drive Sync

Syncs a vault into Google Drive for cross-platform use (works for iOS).

Remotely Save

Sync notes between local and cloud with smart conflict: S3, Dropbox, webdav, OneDrive, Google Drive, Box, pCloud, Yandex Disk, Koofr, Azure Blob Storage.

OneDrive Sync

Sync your Obsidian vault with OneDrive Personal/Consumer

WebDAV Sync

General-purpose & bidirectional WebDAV syncing for your vault. Designed for stability and robust file handling without vendor lock-in.

Syncthing Integration

Syncthing integration.

BRAT

Easily install a beta version of a plugin for testing.

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

Maps

Adds a map layout to bases so you can display notes as an interactive map view.