Why Trilium Notes?

Note apps store notes. Trilium builds a knowledge base:

  • Hierarchical trees — Notes have children, forming deep structures.
  • Cloning — A note can exist in multiple tree locations.
  • Relation maps — Visual connections between concepts.
  • Code notes — Syntax highlighting for 30+ languages.
  • Scripting — Automate with server-side JavaScript.
  • End-to-end encryption — Protect sensitive notes.
  • Full-text search — Find anything instantly.

Prerequisites

  • Docker on any machine.
  • At least 256 MB RAM.

Step 1: Deploy with Docker

docker run -d \
  --name trilium \
  --restart=always \
  -p 8080:8080 \
  -v trilium-data:/home/node/trilium-data \
  zadam/trilium:latest

Access at http://your-server:8080.


Step 2: Note Types

TypeUse CaseFeatures
Text noteGeneral writing, documentationRich text, markdown shortcuts
Code noteScripts, configs, snippetsSyntax highlighting, execution
Relation mapConcept visualizationVisual node-and-edge diagrams
Book noteLong-form contentOrdered child notes as chapters
CanvasDiagrams, mind mapsFreeform drawing
File noteAttachmentsStore any file type

Step 3: Knowledge Base Patterns

PatternStructureUse Case
ZettelkastenAtomic notes + relationsResearch, learning
Documentation wikiHierarchical sectionsTeam docs, SOPs
Personal journalDate-based treeDaily notes, reflection
Project trackerProject → tasks → notesProject management
Code libraryLanguage → category → snippetsDeveloper reference

Trilium vs Alternatives

FeatureTriliumObsidianNotionJoplin
Self-hostedYes (server)No (local files)No (cloud)Yes (sync only)
Hierarchical treeDeep treesFlat foldersPages + DBsNotebooks
Relation mapsBuilt-inPluginNoNo
EncryptionE2E per noteVault-levelNoE2E
ScriptingServer-side JSPlugins (JS)FormulasNo
Code notesYesYes (markdown)Code blocksYes
CostFreeFree / $8/mo syncFree / $10/moFree

Troubleshooting

ProblemSolution
Sync not workingCheck the sync server URL in desktop app settings; verify network connectivity
Note tree is slowLarge databases (>50k notes) may need PostgreSQL backend instead of SQLite
Can’t find a noteUse full-text search (Ctrl+S); check if note is in a protected subtree
Desktop app crashesUpdate to latest version; check Electron compatibility with your OS

Summary

  • Hierarchical knowledge base — not just notes, but structured knowledge.
  • Relation maps visualize connections between concepts.
  • Cloning lets a note exist in multiple tree locations.
  • Self-hosted with E2E encryption for sensitive data.