Trilium Notes
Hierarchical note taking application with personal knowledge base and link graph visualization.
Why consider Trilium Notes?
Trilium Notes is a hierarchical note taking app designed for building large personal knowledge bases. It features deeply nested trees, executable scripts, attributes, and graph views.
Learn Trilium Notes by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide10 sections
What is Trilium Notes?
Trilium Notes (maintained by the TriliumNext community) is an open-source hierarchical note-taking application and personal knowledge base built with Node.js and SQLite. It operates as a powerful, self-hosted alternative to proprietary note-taking tools like Evernote, OneNote, and Roam Research.
Trilium is designed for organizing tens of thousands of complex notes into arbitrarily deep hierarchical trees. It treats notes as structured objects: attach custom attributes, create relations and bi-directional links, execute automated JavaScript scripts inside notes, visualize knowledge connections on interactive link graphs, and sync data end-to-end encrypted between desktop and server instances.
Who Is It For?
- Researchers & Knowledge Workers: Building massive, structured Personal Knowledge Management (PKM) databases and digital second brains.
- Software Developers: Storing searchable code snippets, technical architecture diagrams, and executable automation scripts.
- Privacy Advocates: Keeping personal journals, credentials, and notes on self-hosted servers with strong per-note encryption.
Key Features
- Deep hierarchical note tree: Organize notes without depth limitations; clone single notes into multiple tree locations without duplication.
- Rich note types: Formatted text (CKEditor), Markdown, Code snippets with syntax highlighting, Mermaid/PlantUML diagrams, and canvas drawings.
- Interactive link graph visualizer: Explore semantic relationships and bidirectional connections between notes.
- Scripting & Automation engine: Execute server-side or frontend JavaScript scripts to automate note tagging, backups, and task summaries.
- End-to-end sync: Encrypted synchronization between self-hosted server instances and standalone desktop clients (Linux, macOS, Windows).
Deploying Trilium Server with Docker
version: '3'services: trilium: image: triliumnext/notes:latest container_name: trilium restart: unless-stopped ports: - "8080:8080" environment: - TRILIUM_DATA_DIR=/home/node/trilium-data volumes: - ./trilium_data:/home/node/trilium-dataStart the instance:
docker compose up -dOpen http://localhost:8080 in your browser, select "I am a new user", and create your master password.
Practical Use Cases
1. Developer Code Snippet & Algorithm Library
A developer stores reusable code snippets across 10 programming languages, tagging entries with custom attributes (#language=rust, #framework=tokio) for instant filtering.
2. Automated Daily Journal Logging
A user configures Trilium's built-in Journal feature to auto-generate structured daily note templates containing habit trackers and to-do checklists every morning.
3. Visual Concept Mapping & Second Brain
A researcher links interconnected concepts using @note mentions, using the interactive Link Graph to discover unlinked concept clusters.
Troubleshooting and Limitations
- Desktop to Server Sync Setup: When syncing a desktop client with your server, enter your server URL and authenticate with your master password under Options -> Sync.
- SQLite Database Optimization: Trilium stores all data in a single SQLite file (
document.db); perform periodic database vacuuming under Options -> Advanced to maintain peak search performance.
Official Resources
- GitHub Repository: https://github.com/TriliumNext/Notes
- Documentation: https://triliumnext.github.io/Docs/
Related tools
More options with a similar category or technology profile.
McFly
Fly through your shell history with an intelligent neural network search engine.
cheat
Interactive command-line cheatsheets for system administrators and software engineers.
Pipenv
Python development workflow for humans uniting Pipfile, pip, and virtualenv.
Rye
Comprehensive Python package and workspace management tool written in Rust.