ScriptsApr 16, 2026·3 min read

Trilium Notes — Self-Hosted Hierarchical Knowledge Base

Trilium Notes is a self-hosted, hierarchical note-taking application with rich editing, note cloning, relation maps, and scripting capabilities.

TL;DR
Self-hosted note-taking app with hierarchical structure, note cloning, relation maps, and scripting.
§01

What it is

Trilium Notes is a self-hosted note-taking application designed for building personal knowledge bases. It features a hierarchical note structure, rich WYSIWYG editing, note cloning (one note in multiple places), relation maps for visualizing connections, and a scripting API for automation. Notes are stored in a SQLite database with full-text search.

Researchers, developers, and knowledge workers who maintain large personal knowledge bases benefit from Trilium. It excels at organizing interconnected information that does not fit a flat folder structure.

§02

How it saves time or tokens

Trilium's note cloning feature eliminates information duplication. Instead of copying a note into multiple categories, you clone it so it appears in all relevant places while maintaining a single source of truth. The relation maps visualize connections between notes, helping you find related information faster than text search alone.

§03

How to use

  1. Deploy Trilium via Docker or download the desktop app
  2. Create a note hierarchy and start organizing your knowledge
  3. Use cloning, relation maps, and attributes to build connections between notes
§04

Example

# Docker deployment
docker run -d --name trilium \
  -p 8080:8080 \
  -v trilium-data:/home/node/trilium-data \
  triliumnext/notes

# Open http://localhost:8080
# Create notes with hierarchical structure:
# Root
#   -> Projects
#     -> Project A
#   -> Technologies
#     -> Python (cloned into Project A too)
#   -> People
#     -> Team member (linked via relation map)
§05

Related on TokRepo

§06

Common pitfalls

  • The SQLite database can grow large with many image attachments; monitor disk space and configure regular backups
  • Note cloning creates implicit dependencies; deleting the original note affects all clones
  • The scripting API is powerful but underdocumented; expect trial-and-error when building custom automations

Frequently Asked Questions

How does note cloning work in Trilium?+

Cloning places a single note in multiple locations in your hierarchy without duplicating content. Edit the note in one place, and the changes appear everywhere. This is different from copying, which creates independent duplicates.

Does Trilium support mobile access?+

Trilium provides a web interface accessible from any browser, including mobile. There is no native mobile app, but the web UI is responsive. You can access your server-hosted Trilium from any device.

Can I sync Trilium across devices?+

Yes. Run a Trilium server instance and connect desktop clients to it. The server handles synchronization. This requires network access between clients and the server.

Is Trilium still maintained?+

The original Trilium project transitioned to TriliumNext, a community-maintained fork that continues active development. TriliumNext receives regular updates and bug fixes.

How does Trilium compare to Obsidian?+

Obsidian uses markdown files in a folder structure, making it portable and git-friendly. Trilium uses a SQLite database with richer features like note cloning, relation maps, and scripting. Obsidian has a larger plugin ecosystem; Trilium has deeper built-in features.

Citations (3)

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets