Sync your Obsidian vault to a PostgreSQL database in real-time. This plugin is a TypeScript/Svelte port of the obsync-pg Go daemon.
[[wiki links]] in your notes#inline-tags in your contentobsync-pg folder to your vault's .obsidian/plugins/ directory# Clone the repository
git clone https://github.com/Vonshlovens/obsync-pg-plugin.git
cd obsync-pg-plugin
# Install dependencies
npm install
# Build the release (creates dist/obsync-pg/)
npm run release
# Copy to your vault
cp -r dist/obsync-pg /path/to/vault/.obsidian/plugins/
The installed plugin folder should contain:
.obsidian/plugins/obsync-pg/
├── main.js
├── manifest.json
└── node_modules/
├── pg/
├── pg-pool/
├── pg-protocol/
├── pg-types/
├── pgpass/
└── ... (other pg dependencies)
Note: The node_modules/ folder with pg dependencies is required. The plugin uses native PostgreSQL drivers that cannot be bundled into main.js.
You need a PostgreSQL database (version 13+ recommended). The plugin will automatically create the necessary tables when you run migrations.
The plugin creates two tables in your configured schema:
path - Relative path from vault rootfilename - File nametitle - From frontmatter or filenametags - Array of tags (frontmatter + inline)aliases - From frontmattercreated_at, modified_at - Timestampsfrontmatter - JSONB with all custom fieldsbody - Markdown without frontmatterraw_content - Original file contentcontent_hash - SHA256 for change detectionoutgoing_links - Extracted wiki linkspath, filename, extensionmime_type - Detected content typedata - Binary content (BYTEA)content_hash - SHA256 for change detectionGlob patterns to exclude from sync:
.obsidian/** (default).trash/** (default).git/** (default)# Install dependencies
npm install
# Build for development (with watch)
npm run dev
# Build for production
npm run build
# Type check Svelte components
npm run svelte-check
MIT