Plain files beat clever databases for notes you want readable in twenty years. That principle decides this comparison: if you live in Obsidian, self-host sync with the LiveSync plugin and CouchDB and your vault stays a folder of Markdown you could grep on a dead man's laptop. Joplin is the pick for an integrated open-source app with end-to-end encrypted sync over almost any backend. Trilium is the pick for a scriptable personal wiki if you accept that your notes live in its database and leave through an export function.

The self-hosted notes comparison

JoplinTrilium NotesObsidian + LiveSync
Storage formatSQLite per device, Markdown insideServer-side SQLite treePlain Markdown files on disk
Sync architectureAny dumb storage: WebDAV, S3, Nextcloud, Joplin ServerOwn sync protocol to its serverCouchDB replication via plugin
End-to-end encryptionYes, optionalPer-note "protected notes"Yes, optional passphrase
MobileNative iOS/Android appsWeb UI (PWA), no offlineNative apps, plugin works on both
App licenceOpen source (AGPL)Open source (AGPL)Proprietary app, open plugin
Export pathJEX archive + raw MarkdownMarkdown/HTML zip per subtreeAlready files — nothing to export

Sync architectures are the real difference

Joplin's design is the most forgiving: the server is dumb storage, so anything that can hold files — a Nextcloud WebDAV folder, an S3 bucket, the dedicated Joplin Server container — becomes a sync target, and E2EE happens client-side before upload. Losing the server loses nothing; every device holds the full corpus.

Trilium inverts this: the server is the brain, holding the note tree in SQLite, with desktop clients syncing against it and the browser as the universal client. That buys its superpowers — a hierarchy where notes have multiple parents, attribute-based queries, and scripting notes that execute inside the app (people build dashboards and CRMs out of it). One history note to know: the original author archived his repo in 2024, and the community TriliumNext fork — now the maintained Trilium Notes — carried on without a beat; activity today is healthy.

Obsidian LiveSync is a community plugin that replicates your vault through CouchDB. Setup is the least polished of the three (run CouchDB, apply its init settings, paste a setup URI into the plugin), and in exchange you get near-real-time sync with proper conflict resolution that the naive alternative — Syncthing on a vault, which corrupts state when mobile sync races the editor — can't offer. A minimal server:

services:
  couchdb:
    image: couchdb:3.4
    environment:
      COUCHDB_USER: obsidian
      COUCHDB_PASSWORD: use-a-real-password
    volumes:
      - ./data:/opt/couchdb/data
      - ./etc:/opt/couchdb/etc/local.d
    ports:
      - "127.0.0.1:5984:5984"
    restart: unless-stopped

Put it behind your reverse proxy with TLS, run the plugin's one-time CouchDB setup, and budget an evening for the initial sync of a large vault on mobile.

Encryption, honestly compared

All three can encrypt, with different scopes. Joplin's E2EE covers everything but must be enabled deliberately — turn it on before your first sync to an off-box target, because retrofitting encryption onto synced data is a slow re-upload of the world. LiveSync's passphrase encrypts note content end-to-end through CouchDB. Trilium's protected notes encrypt content per-note behind a session password, but the tree structure and titles of unprotected notes stay plaintext in the server database — fine on your own LAN, worth knowing before renting a VPS for it. Practical rule: if the sync target is hardware you don't control, E2EE on; if it's the box under your desk, full-disk encryption of the host covers the realistic threats with less key-loss risk.

The mobile story will make or break daily use

Joplin's native apps are the most complete: full offline corpus, E2EE, share-sheet capture, background-ish sync on Android and sync-on-open behaviour on iOS. Obsidian's mobile apps are excellent editors, and LiveSync works on both platforms — the caveats are the heavy first sync and iOS's background limits, meaning you open the app and wait a beat before your newest desktop note appears. Trilium is the outlier: the mobile experience is its web UI, which is serviceable at a coffee shop and useless on a plane — no offline. If capture-anywhere is your core loop, that alone eliminates Trilium as a primary system.

Export paths: judge them before you need them

The exit door is the honest test of "owning" your notes. Obsidian wins by default — there's nothing to export; the vault is already portable Markdown, and a future you can abandon the app without an import step. Joplin exports JEX archives (full fidelity, Joplin-specific) and raw Markdown with front matter (portable, loses some internal linking); both are scriptable via joplin export in the CLI client, so an automated monthly export into your backup rotation is two lines of cron. Trilium exports any subtree as a zip of Markdown or HTML — real, but lossy for the attribute-and-script layer that made you choose Trilium, which is the lock-in stated plainly. Refugees from Notion weighing these against hosted options should start with the Notion alternatives rundown — the same export-first logic applies there, and to every candidate in the wider notes category.

What I'd do

Already an Obsidian user: LiveSync plus CouchDB behind Caddy, encryption passphrase on, evening of setup, done — plain files plus real sync is the strongest combination here. Starting fresh and wanting open source end-to-end: Joplin with E2EE enabled on day one, synced against whatever storage you already run. Choose Trilium when its scriptable-wiki architecture is the point, run it LAN-only or behind a VPN, and schedule a monthly Markdown export as your insurance policy. In every case the test is the same: could you read these notes in 2040 with no company, no server, and no app store? Two of the three pass by design; the third passes only if you automate the exit.