Trilium Notes

Hierarchical note-taking for building knowledge bases

Notes & Knowledge Base ★ 37.9k stars Easy setup AGPL-3.0

Trilium Notes is a hierarchical note-taking application designed for building large personal knowledge bases with rich linking and scripting. It targets power users who want a structured second brain. It is deployed via Docker as a server with desktop and web clients.

Trilium Notes setup guides & articles

Hands-on coverage of Trilium Notes from the blog.

Key features

  • Deep hierarchical note tree
  • Note attributes and relations
  • Scripting and automation
  • Encrypted protected notes

Quick deploy

A starting point for self-hosting Trilium Notes - check the official docs for the full set of options.

  • Image triliumnext/trilium:latest
  • Web port 8080
  • Persist /home/node/trilium-data
Docker Compose
services:
  trilium:
    image: triliumnext/trilium:latest
    ports:
      - "8080:8080"
    volumes:
      - ./trilium-data:/home/node/trilium-data
    restart: unless-stopped
docker run
docker run -d --name trilium \
  -p 8080:8080 \
  -v ./trilium-data:/home/node/trilium-data \
  --restart unless-stopped \
  triliumnext/trilium:latest

Pros & cons

Strengths

  • Powerful for big knowledge bases
  • Flexible structure
  • Scriptable

Trade-offs

  • Steep learning curve
  • Single-user oriented

Trilium Notes replaces

Last reviewed Aug 26, 2026 · 769 words

The Trilium you install today is TriliumNext, the community fork that took over when the original author stepped back in 2024, and the practical consequence is one rule: your desktop client and your server must run the same version, or sync refuses to connect. That rule is behind most Trilium support threads, and it is why the image tag below is pinned in my own setup. Everything else about Trilium is a power user's dream: a note tree with unlimited depth, notes that can live in more than one place, attributes and relations you can query, and a built-in JavaScript scripting layer. 37,594 stars, AGPL-3.0, TypeScript, and it idles in about 256 MB.

One container, one volume, one user

services:
  trilium:
    image: triliumnext/trilium:latest
    ports:
      - "8080:8080"
    volumes:
      - ./trilium-data:/home/node/trilium-data
    restart: unless-stopped

The first visit to port 8080 asks you to set a password, and that password is the whole authentication model. Trilium is single-user by design: no accounts, no sharing permissions, no collaborative editing. If two people need a shared knowledge base, this is the wrong tool and the notes category lists the multi-user options. If it is your brain alone, single-user is a feature, because no permission system means nothing to misconfigure.

The tree is the point, not the editor

Most note apps are a flat list with tags bolted on. Trilium's data model is a tree where a note can be cloned into several branches without duplicating content, and each note carries labels (#book, #year=2019) and relations (~author=Some Person Note). The search language understands both, so #book #year>=2015 ~author.* is a real query. Combine that with note types beyond text (code, canvas, mermaid, relation map, saved search, web view) and you get something closer to a personal database than a notebook. The learning curve the project admits to lives exactly here: the first week you use it like Evernote and wonder what the fuss is, the second week you discover attributes and reorganise everything.

Scripting turns it into a tool you built

Notes of type "code" carrying a #run=frontendStartup or #run=backendStartup label execute inside the app. People use this for daily-note generators, task rollups, custom widgets in the right pane, and API integrations. There is also a REST API (ETAPI) for external tools, which is how the web clipper and mobile scripts talk to it. None of this is required, but if you are choosing Trilium over Joplin the scripting is usually the deciding factor; the Joplin vs Trilium comparison walks through that split in detail. The one collaboration-adjacent feature is sharing: put a #shareRoot label on a note and it, plus its subtree, is published read-only at /share/ on your server, which is enough for a personal wiki or a recipe page you send to family without giving anyone the password.

Protected notes are encrypted, everything else is not

Trilium's protected notes are encrypted at rest with a key derived from your password and auto-lock after a timeout, which is the right tool for the handful of notes holding recovery codes or a private journal. The rest of the database, a single SQLite file inside trilium-data, is plaintext. Treat disk encryption and HTTPS as your responsibility, not the app's.

Backups are automatic, restores are manual

The server writes its own daily, weekly and monthly backups into trilium-data/backup/ as full copies of the database. That is better than most apps manage, but the copies sit on the same disk as the live data, so add the whole trilium-data directory to your off-box backup. Restoring is copying a backup file over document.db while the container is stopped; try it once on a throwaway container so the first real restore is not also the first attempt. And when you upgrade, upgrade the server and every desktop client in the same sitting.

What I'd do

Run the container behind a reverse proxy with HTTPS, pin the image tag instead of latest, install the matching desktop app on your main machine for offline editing, and let sync do the rest. Spend the first weekend learning labels and relations before you import anything large, because restructuring 5,000 notes later is painful. If you want a plain Markdown folder you can grep, choose Joplin or Logseq instead. If you want a personal database that happens to hold notes, Trilium is the best self-hosted option there is.

Compare Trilium Notes

34 head-to-head comparisons.

Similar notes & knowledge base apps