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.
Ready-to-run agent install
This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.
npx -y tokrepo@latest install 677aaba2-39c1-11f1-9bc6-00163e2b0d79 --target codexRun after dry-run confirms the install plan.
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.
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.
How to use
- Deploy Trilium via Docker or download the desktop app
- Create a note hierarchy and start organizing your knowledge
- Use cloning, relation maps, and attributes to build connections between notes
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)
Related on TokRepo
- Self-hosted tools — Browse self-hosted productivity applications
- AI tools for documents — Explore knowledge management solutions
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
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.
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.
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.
The original Trilium project transitioned to TriliumNext, a community-maintained fork that continues active development. TriliumNext receives regular updates and bug fixes.
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)
- TriliumNext GitHub— Self-hosted hierarchical note-taking with cloning and relation maps
- Trilium Wiki— SQLite database with full-text search
- Trilium Documentation— Scripting API for note automation
Related on TokRepo
Discussion
Related Assets
Flatnotes — Self-Hosted Database-Free Markdown Notes
Flatnotes is a lightweight, self-hosted note-taking web app that stores notes as plain Markdown files in a flat folder — no database required, with full-text search and TOTP authentication.
Foam — Personal Knowledge Management System for VS Code
Foam is a free, open-source personal knowledge management tool that runs inside VS Code. Inspired by Roam Research, it uses wikilinks, backlinks, and a graph visualization to help you organize interconnected notes in plain Markdown files.
LinkStack — Self-Hosted Link-in-Bio Platform
An open-source Linktree alternative that lets you create a personalized profile page with all your important links, self-hosted on your own server.
Baikal — Lightweight Self-Hosted CalDAV and CardDAV Server
Baikal is a lightweight, self-hosted CalDAV and CardDAV server written in PHP that syncs calendars and contacts across all your devices without third-party cloud services.