TriliumNext is a feature-rich, hierarchical personal knowledge base — a TypeScript fork of the popular Trilium Notes project. It runs entirely on your own server and stores everything in a SQLite database. That makes it fast and portable, but it also means there's no cloud fallback: when your TriliumNext server goes down, you lose access to every note, link, and attachment in your knowledge base. Vigilmon lets you watch the web server, sync service, database, note sharing, and API response times from a single dashboard.
What You'll Set Up
- HTTP uptime monitoring for the web interface (port 8080)
- Health and sync service availability check
- Database integrity probe via heartbeat
- Note sharing endpoint monitoring
- API response time tracking
- Instant alerts for any failure
Prerequisites
- TriliumNext running (TypeScript/Node.js) on port 8080
- A free Vigilmon account
Why TriliumNext Monitoring Matters
TriliumNext stores your entire knowledge base — notes, code snippets, diagrams, journals, task lists — in one place. A server failure doesn't just cause inconvenience; it can interrupt active work and, in the worst case, leave you without access to information you need urgently. The failure modes are distinct:
- Web server down — you can't access any notes, search, or the note tree
- Sync service failure — mobile and secondary desktop clients fall behind; the desktop app may still work locally but syncing stops
- Database corruption or unavailability — TriliumNext uses SQLite; a disk-full event or filesystem error can corrupt the database and lose data permanently
- Note sharing broken — publicly shared notes return errors; external links to your knowledge base stop working
- Slow API response — the ETAPI (external API) becomes unusable for integrations, scripts, or note automation workflows
Monitoring only the homepage misses sync failures, slow API responses, and early database warning signs.
Step 1: Monitor the TriliumNext Web Interface
TriliumNext serves its full web UI on port 8080. Add an HTTP uptime monitor to confirm the server is running:
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter
http://your-triliumnext-host:8080. - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
If you've set up a reverse proxy (nginx, Caddy, Traefik) in front of TriliumNext, monitor both the proxy URL and the direct port 8080 address. A proxy misconfiguration is a common failure point after upgrades.
Step 2: Monitor Sync Service Health
TriliumNext includes a built-in sync server that allows secondary clients (mobile apps, other desktops) to sync notes bidirectionally. A sync endpoint health check confirms the sync service is operational without requiring full authentication.
Add a monitor for the sync info endpoint:
- Click Add Monitor → HTTP / HTTPS.
- URL:
http://your-triliumnext-host:8080/api/health(or/healthdepending on your version). - Expected status:
200. - Check interval:
2 minutes. - Save.
Verify the endpoint manually:
curl http://your-triliumnext-host:8080/api/health
If TriliumNext returns a JSON status object, add a Body match:
- Expected body contains:
"status":"ok"(adjust to match the actual response key)
Also add a TCP monitor for lightweight connectivity checking:
- Click Add Monitor → TCP.
- Host:
your-triliumnext-host, Port:8080. - Check interval:
2 minutes. - Save.
Step 3: Monitor Database Integrity via Heartbeat
TriliumNext uses SQLite as its primary database. SQLite is embedded (no separate process to monitor), so you can't TCP-probe it directly. Instead, use a cron-driven Vigilmon heartbeat that runs a lightweight integrity check on the database file.
In Vigilmon:
- Click Add Monitor → Cron Heartbeat.
- Expected interval:
10 minutes. - Copy the heartbeat URL.
On the TriliumNext host, add a cron job:
# /etc/cron.d/triliumnext-db-check
*/10 * * * * root \
sqlite3 /path/to/triliumnext/document.db "PRAGMA integrity_check;" | grep -q "^ok$" && \
curl -s https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_TOKEN
Replace /path/to/triliumnext/document.db with the actual path to your TriliumNext database (often ~/trilium-data/document.db or the path set in your config).
Also monitor disk space to catch a full disk before SQLite corruption occurs:
# /etc/cron.d/triliumnext-disk-check
*/10 * * * * root \
df /path/to/triliumnext/data | awk 'NR==2 {if ($5+0 < 90) exit 0; exit 1}' && \
curl -s https://vigilmon.online/heartbeat/YOUR_DISK_HEARTBEAT_TOKEN
If the integrity check fails or disk exceeds 90% usage, the heartbeat stops pinging and Vigilmon alerts you.
Step 4: Monitor Note Sharing Endpoints
TriliumNext supports sharing individual notes or note subtrees as public web pages. Shared notes are accessed via a /share/{shareId} URL. If the sharing subsystem fails, external links to your published notes return errors — without any indication on the main interface.
To monitor a specific shared note:
- Get the share URL for one of your shared notes (from the TriliumNext sharing UI).
- Click Add Monitor → HTTP / HTTPS in Vigilmon.
- URL:
http://your-triliumnext-host:8080/share/YOUR_SHARE_ID. - Expected status:
200. - Check interval:
5 minutes. - Save.
This monitor also indirectly validates that the note tree is accessible and the sharing middleware is functional.
Step 5: Monitor API Response Time
TriliumNext exposes ETAPI (External TriliumNext API) for automation scripts, integrations, and third-party tools. Slow API responses affect every integration that reads or writes notes programmatically.
Add an HTTP monitor with response time tracking:
- Click Add Monitor → HTTP / HTTPS.
- URL:
http://your-triliumnext-host:8080/etapi/app-info(no auth needed for this endpoint in most versions). - Expected status:
200. - Check interval:
2 minutes. - Set Response time threshold (if available):
2000ms— alert if the API takes more than 2 seconds to respond. - Save.
Verify the endpoint:
curl http://your-triliumnext-host:8080/etapi/app-info
Consistently slow responses here indicate SQLite lock contention, disk I/O pressure, or memory exhaustion on the host.
Step 6: Configure Alert Channels
- In Vigilmon, go to Alert Channels → Add Channel.
- Add email, Slack (paste your incoming webhook URL), or another channel.
- For the web interface monitor, set Consecutive failures before alert to
2— brief restarts during upgrades are expected. - For database and sync monitors, set to
1— data access failures should be flagged immediately. - Enable the alert channel on all monitors.
Alert example:
🔴 DOWN: triliumnext.yourdomain.com
Status: Connection timeout
Detected: 2 minutes ago
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web interface | :8080 | Node.js crash, container down |
| Sync health endpoint | /api/health | Sync service failure, initialization error |
| TCP port | :8080 TCP | Process gone, port closed |
| Database integrity | Cron heartbeat | SQLite corruption, disk full |
| Note sharing | /share/:id | Sharing subsystem broken |
| ETAPI response time | /etapi/app-info | Slow I/O, lock contention, memory pressure |
TriliumNext puts your entire knowledge base on your own hardware. Vigilmon makes sure the server, database, and sharing layer stay healthy — so your notes are always accessible when you need them.
Get started free at vigilmon.online.