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.

Introduction

Trilium Notes (continued as TriliumNext) is a self-hosted, hierarchical note-taking application designed for building large personal knowledge bases. It combines a tree-structured note hierarchy with powerful features like note cloning, relation maps, and a built-in scripting API.

What Trilium Does

  • Organizes notes in an infinitely deep tree hierarchy with drag-and-drop reordering
  • Supports cloning notes into multiple locations without duplication
  • Provides a WYSIWYG editor with Markdown, code blocks, math, and file attachments
  • Visualizes note relationships with interactive relation maps and link maps
  • Includes full-text search with attribute-based filtering and saved searches

Architecture Overview

Trilium runs as a Node.js server with an SQLite database storing all notes, revisions, and metadata. The frontend is a single-page application. A sync mechanism allows a desktop instance and a server instance to stay synchronized over HTTPS. All data can be encrypted at rest with a password.

Self-Hosting & Configuration

  • Deploy via Docker with a single volume mount for persistent data
  • Desktop apps available for Windows, macOS, and Linux for local use
  • Enable sync between desktop and server by pairing with a sync token
  • Configure HTTPS with a reverse proxy for secure remote access
  • Set a protected session password to encrypt sensitive note branches

Key Features

  • Note cloning lets a single note appear in multiple tree locations
  • Built-in scripting with a JavaScript API for custom widgets and automations
  • Revision history tracks every change with full diff support
  • Web clipper browser extension saves pages directly into your knowledge base
  • Relation maps let you visually connect notes and build concept diagrams

Comparison with Similar Tools

  • SiYuan — block-level references; Trilium uses a tree hierarchy with cloning
  • Obsidian — file-based vault; Trilium uses a database with richer metadata
  • Joplin — simpler sync-focused notes; Trilium offers scripting and relations
  • Logseq — outliner-first; Trilium is document-first with tree navigation
  • BookStack — team wiki; Trilium is personal knowledge base focused

FAQ

Q: Is TriliumNext the same as Trilium? A: TriliumNext is the community-maintained continuation after the original creator archived the project. It receives active updates and new features.

Q: Can I access it on mobile? A: The web interface works on mobile browsers. There are also community-built mobile apps that sync with the server instance.

Q: How does sync work? A: You pair a desktop client with a server instance using a token. Changes sync bidirectionally over HTTPS with conflict resolution.

Q: Is my data encrypted? A: You can enable encryption at rest with a password. Individual note branches can be marked as protected, requiring the password to view.

Sources

Discussion

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

Related Assets