How to Install Trilium Notes for Knowledge Management
Trilium Notes is a hierarchical note-taking application designed for building personal knowledge bases. It supports rich text editing, code blocks with syntax highlighting, mind maps, relation maps, and powerful scripting capabilities. Running Trilium on your Breeze gives you a private, always-accessible knowledge management system that can grow with your needs over years of use.
Prerequisites
- A Breeze instance with at least 1 GB of RAM
- Docker installed on your Breeze
- A domain or subdomain (e.g.,
notes.example.com)
Step 1 — Deploy Trilium with Docker
Run Trilium as a Docker container with persistent storage:
mkdir -p ~/trilium/data
docker run -d \
--name trilium \
--restart unless-stopped \
-p 127.0.0.1:8080:8080 \
-v ~/trilium/data:/home/node/trilium-data \
triliumnext/notes:latest
Step 2 — Initial Setup
Access Trilium at http://your-breeze-ip:8080. On first launch, you will be prompted to:
- Choose between "Server" mode (for web access) or "Desktop" mode
- Set a strong password to protect your notes
- Choose your preferred theme
Select "Server" mode since you are running Trilium on your Breeze for remote access.
Step 3 — Configure the Reverse Proxy
Set up Nginx to proxy Trilium with WebSocket support for real-time syncing:
server {
listen 443 ssl http2;
server_name notes.example.com;
client_max_body_size 50M;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Step 4 — Understanding the Note Tree
Trilium organizes notes in a hierarchical tree structure, similar to a file system. Key concepts include:
- Notes — the basic unit, supporting rich text, code, files, images, and more
- Branches — a note can appear in multiple places in the tree (like symbolic links)
- Attributes — metadata attached to notes for organization and scripting
- Relations — typed links between notes that create a knowledge graph
Start by creating top-level categories like "Work", "Personal", "Projects", and "Reference", then build out subtrees beneath them.
Step 5 — Powerful Features
Trilium goes far beyond basic note-taking:
- Note types — text, code (with syntax highlighting for dozens of languages), file attachments, rendered HTML, mind maps, and relation maps
- Web clipper — install the browser extension to save web pages directly into your note tree
- Search — full-text search with support for attribute-based filtering and boolean operators
- Note versioning — automatic version history for every edit, with the ability to restore previous versions
- Day notes — journal-style notes automatically organized by date for daily logging
- Scripting — write custom JavaScript scripts that run server-side to automate tasks, generate reports, or extend functionality
Desktop Sync
For offline access, install the Trilium desktop application on your computer. Configure it to sync with your Breeze-hosted server under Options → Sync. Enter your server URL and password, and Trilium will keep both copies in sync. Edits made offline will synchronize automatically when connectivity is restored.
Backup Strategy
Trilium automatically creates daily backups in the data directory. For additional safety, back up the ~/trilium/data directory to an external location. The database is a single SQLite file, making backups straightforward:
cp ~/trilium/data/document.db ~/backups/trilium-$(date +%Y%m%d).db
Schedule this command with cron on your Breeze for automated daily backups.