Self-Hosted Trilium: One Note in Three Places Without Copy-Paste

Your notes app has folders. Your brain doesn't. You filed "Docker networking" under DevOps, but it also belongs under Client X's migration runbook and under that homelab project you abandoned in 2023. Copy-paste duplicates. Symlinks feel wrong. You end up with three versions of the same paragraph and no idea which one is current.

Trilium Notes (maintained by the TriliumNext community) is built for messy, overlapping knowledge. ~36k GitHub stars, hierarchical notes in a deep tree, and a killer feature called cloning — one note can live in multiple branches at once. Edit it anywhere, it updates everywhere. No duplicate files pretending to be a knowledge base.

What it actually does

Trilium is a personal knowledge base, not a sticky-note app. Notes form an arbitrarily deep tree — any note can have children, so folders aren't a separate concept. A "leaf" is just a note with no kids.

Cloning. Put the same note under "Work → Clients" and "Reference → Bash tricks" without copying content. They're the same note — change the title once, both paths reflect it. Asterisks in the tree show you when a note has multiple parents.

Rich note types. Text with a WYSIWYG editor, Markdown, code blocks with syntax highlighting, canvas drawings, Mermaid diagrams, mind maps, spreadsheets, saved searches. Attributes and relations tag notes for filtering — promoted attributes become table columns for structured views.

Scripting. Custom widgets and server-side logic inside Trilium — power users automate dashboards and integrations without leaving the app. REST API for external tooling if you want to script from outside.

Protected notes. End-to-end encryption for sensitive notes — password-protected content that stays encrypted on the server.

Sync model. Desktop app (Windows, macOS, Linux) works fully offline with a local SQLite database. Point it at your self-hosted server to sync across devices. Mobile access via PWA in the browser — not a polished native app like Immich, but your library follows you.

Trilium vs SiYuan vs Memos

We've covered other note stacks:

  • Memos — quick timeline capture, minimal structure
  • SiYuan — block-level references and bidirectional links in a WYSIWYG block editor

Trilium is the tree + clone camp. If you think in outlines and want one note in multiple contexts without block syntax, Trilium clicks. SiYuan wins on block embeds and flashcards; Memos wins on "type and forget." Pick the mental model that matches how you actually think.

Why self-host?

Your second brain is sensitive. Client notes, journal entries, credentials-adjacent runbooks, medical stuff you photographed for reference — PKM tools become a life archive. Self-hosting on a Canadian VPS keeps that SQLite sync server on disks you control.

Multi-device without a cloud vendor. Desktop Trilium syncs to your server — not Trilium's servers (unless you choose a third-party host). One sync endpoint for laptop, work machine, and phone browser.

Offline-first. The desktop app works without network; sync reconciles when you're back. Good for flights, cottage weekends, and anywhere VPN is flaky.

What running it takes

Docker is the straightforward server path. Official image: triliumnext/trilium:latest on port 8080. Mount a persistent volume — everything lives in one SQLite database inside that data directory.

docker run -d \
  --name trilium \
  -p 8080:8080 \
  -v ~/trilium-data:/home/node/trilium-data \
  --restart unless-stopped \
  triliumnext/trilium:latest

Images support AMD64, ARMv7, and ARM64 — Raspberry Pi and Apple Silicon VPS hosts work. Rootless images (triliumnext/trilium:rootless or triliumnext/notes:rootless) run without container root if that matters for your security policy.

Sizing: Trilium is lighter than photo or LLM stacks. Plan 2 GB RAM for comfortable server use with a large note tree; disk grows with attachments and embedded images. Keep the data volume on local SSD — SQLite on NFS/SMB can be painful; Trilium's docs call this out explicitly.

HTTPS via nginx or Caddy in front. Configure config.ini in the data directory for TLS proxy settings. Back up the entire trilium-data folder — that's your whole knowledge base in one place.

Connect desktop clients to https://your-domain for sync. Test restore before you trust it with years of notes.

Who it's for (and who should skip it)

Good fit: developers and researchers building deep hierarchical PKM, consultants who need the same note under multiple client trees, anyone outgrowing flat-folder note apps, homelabbers who want sync without Notion's cloud.

Maybe skip it: if you want block-level Roam/Obsidian-style daily notes with minimal setup — Trilium has a learning curve. If you need best-in-class mobile camera backup, that's Immich territory. If the UI feels dated compared to SiYuan, trust your gut — PKM is personal.

Hosting it in Canada

We run Trilium on Canadian Docker hosting — TLS, volume backups on the data directory, and firewall rules so your sync server isn't public without auth. Pair with Uptime Kuma if your team depends on the sync endpoint daily.

Tell us how many devices sync and roughly how big the database is — we'll size disk for SQLite growth and keep the backup scope simple: one folder, one restore procedure.

Tags:
  • Trilium
  • PKM
  • Notes
  • Self-Hosted
  • Docker

Need Help With Your Hosting?

Tell us about your application — we respond within 1 hour with honest recommendations.