TiddlyWiki on Node.js (TW5 or TW5-Bob for multi-user setups) turns your personal notebook into a persistent server that can be accessed from any browser. But because it stores tiddlers as individual files on disk, it's vulnerable to a class of failures that HTTP monitors alone won't catch: write permission errors, full disks, backup directory misconfigurations, and WebSocket failures in multi-user mode. Vigilmon lets you watch the server, its endpoints, and its storage layer so you catch problems before a save silently fails.
What You'll Set Up
- HTTP monitor for the TiddlyWiki root serving the wiki
- HTTP monitor for the wiki list endpoint (content health check)
- HTTP monitor for the wiki save/PUT endpoint (write path health)
- WebSocket connectivity heartbeat for TW5-Bob multi-user sync
- Cron heartbeat for backup directory write access
- TLS certificate expiry monitor
- Alerting configuration for the full stack
Prerequisites
- TiddlyWiki on Node.js running (default port
8080) - Optional: TW5-Bob installed for multi-user support
- Backups enabled (TiddlyWiki backs up the wiki file before each save)
- A free Vigilmon account
Step 1: Monitor the TiddlyWiki Server Process
The root HTTP endpoint confirms the Node.js process is alive and serving the wiki. If the process crashes or the port becomes unavailable, all access is lost.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your TiddlyWiki URL:
http://your-server:8080(or your HTTPS domain). - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
# Quick manual check
curl -I http://your-server:8080
# HTTP/1.1 200 OK
If you use HTTP Basic Auth, include credentials in the monitor URL: http://user:pass@your-server:8080. Vigilmon stores these credentials encrypted.
Step 2: Monitor the Wiki List Endpoint
The list endpoint (GET /recipes/default/tiddlers/limit/10) verifies that TiddlyWiki is not just alive but actively serving tiddler content. A 200 response with at least one tiddler means the storage layer is readable.
- Click Add Monitor → HTTP / HTTPS.
- Set URL to
http://your-server:8080/recipes/default/tiddlers/limit/10. - Set Expected HTTP status to
200. - Set Check interval to
2 minutes. - Optionally, set Response body must contain to
[(the start of the JSON array). - Click Save.
# Verify manually
curl http://your-server:8080/recipes/default/tiddlers/limit/10
# [{"title":"$:/SiteTitle",...}, ...]
This endpoint returns an empty array [] if no tiddlers exist, which is still a 200. If you have a known tiddler like $:/SiteTitle, add it to the response body check for a stricter verification.
Step 3: Monitor the Tiddler Save Endpoint
The PUT endpoint (PUT /recipes/default/tiddlers/:title) is the most critical path in TiddlyWiki — it's what every save operation calls. A failure here means tiddlers appear to save in the UI but are silently lost on refresh.
TiddlyWiki's PUT endpoint requires a JSON body, so we probe it with a minimal test tiddler using a cron heartbeat:
#!/bin/bash
# /usr/local/bin/tw-write-check.sh
TW_HOST="http://your-server:8080"
TIDDLER_TITLE="_vigilmon_writecheck"
# Write a test tiddler
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-X PUT "${TW_HOST}/recipes/default/tiddlers/${TIDDLER_TITLE}" \
-H "Content-Type: application/json" \
-d '{"title":"_vigilmon_writecheck","text":"ok","tags":"vigilmon-check"}')
if [ "$STATUS" -eq 204 ] || [ "$STATUS" -eq 200 ]; then
curl -s https://vigilmon.online/heartbeat/YOUR_WRITE_HEARTBEAT_ID
fi
Schedule in cron:
# /etc/cron.d/tiddlywiki-write-check
*/5 * * * * www-data /usr/local/bin/tw-write-check.sh
In Vigilmon:
- Click Add Monitor → Cron Heartbeat.
- Set Expected ping interval to
5 minutes. - Set Grace period to
3 minutes. - Copy the heartbeat URL into the script.
- Click Save.
If write permissions break (e.g., the tiddlers directory ownership changes), the PUT returns a 500 and the heartbeat stops — Vigilmon alerts you within one interval.
Step 4: Monitor WebSocket Sync (TW5-Bob Multi-User)
TW5-Bob extends TiddlyWiki with multi-user support via WebSockets. If the WebSocket server fails, clients in different browser sessions stop seeing each other's edits in real time, with no visible error in the UI.
Use a cron heartbeat that tests WebSocket connectivity:
#!/bin/bash
# /usr/local/bin/tw-ws-check.sh
# Requires: npm install -g wscat
WS_URL="ws://your-server:8080"
# Send a ping message and wait for a response
timeout 5 wscat -c "$WS_URL" --execute "ping" 2>/dev/null && \
curl -s https://vigilmon.online/heartbeat/YOUR_WS_HEARTBEAT_ID
Alternatively, use a simple Node.js script:
#!/usr/bin/env node
// ws-check.js
const WebSocket = require('ws');
const https = require('https');
const ws = new WebSocket('ws://your-server:8080');
const HEARTBEAT_URL = 'https://vigilmon.online/heartbeat/YOUR_WS_HEARTBEAT_ID';
ws.on('open', () => {
https.get(HEARTBEAT_URL, () => {});
ws.close();
});
ws.on('error', () => process.exit(1));
setTimeout(() => process.exit(1), 5000);
Schedule in cron every 5 minutes and create a matching Cron Heartbeat in Vigilmon.
Step 5: Monitor Backup Directory Write Access
TiddlyWiki backs up the entire wiki file before each save by writing a timestamped copy to the backup directory. If the backup directory becomes unwritable (permissions issue, full disk, NFS mount failure), saves silently skip the backup — and the next crash has no recovery point.
#!/bin/bash
# /usr/local/bin/tw-backup-check.sh
BACKUP_DIR="/path/to/tiddlywiki/backups" # adjust to your config
TEST_FILE="${BACKUP_DIR}/.vigilmon_check"
touch "$TEST_FILE" 2>/dev/null && rm "$TEST_FILE" && \
curl -s https://vigilmon.online/heartbeat/YOUR_BACKUP_HEARTBEAT_ID
Schedule every 10 minutes in cron and create a Cron Heartbeat in Vigilmon with a 10 minute expected interval.
Step 6: Monitor TLS Certificate Expiry
If TiddlyWiki is served over HTTPS (via nginx reverse proxy or Caddy), an expired certificate locks all users out of the wiki from their browsers. Add a certificate monitor:
- Click Add Monitor → HTTP / HTTPS.
- Enter your HTTPS wiki URL:
https://wiki.yourdomain.com. - Enable Monitor SSL certificate.
- Set Alert when certificate expires in less than
21 days. - Click Save.
If you use Caddy or Let's Encrypt, also add a cron heartbeat that confirms certificate renewal ran:
# After certbot renewal (add to /etc/letsencrypt/renewal-hooks/post/)
curl -s https://vigilmon.online/heartbeat/YOUR_CERT_RENEWAL_HEARTBEAT_ID
Set the renewal heartbeat interval to 60 days — if certbot fails to renew, you'll know 30 days before the cert expires.
Step 7: Monitor Plugin and Static Asset Serving
TiddlyWiki serves plugin JavaScript and CSS files as static assets. If the Node.js static file handler fails (rare, but possible after upgrades), the wiki loads as a blank page even though the server returns 200 on the root.
Add an HTTP monitor for a known static asset:
- Click Add Monitor → HTTP / HTTPS.
- Set URL to
http://your-server:8080/favicon.ico(or any guaranteed static resource in your wiki). - Set Expected HTTP status to
200. - Set Check interval to
5 minutes. - Click Save.
Step 8: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
- Set the root HTTP monitor and write-check heartbeat to alert on
1 failure— a single missed save is data loss. - Set the WebSocket heartbeat to alert after
2 consecutive failuresto avoid flapping on brief disconnects. - Set the TLS certificate monitor to alert at
1 failure. - Set the backup directory heartbeat to alert after
2 missed pings— a single skipped check during a restart is acceptable.
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Root HTTP | :8080 | Node.js process down |
| List endpoint | /recipes/default/tiddlers/limit/10 | Storage unreadable |
| Write heartbeat | Cron PUT every 5 min | Write permissions broken, saves failing silently |
| WebSocket heartbeat | ws://server:8080 | Multi-user sync broken (TW5-Bob) |
| Backup heartbeat | Cron every 10 min | Backup directory unwritable |
| TLS cert | https://wiki.domain | Certificate expired, users locked out |
| Static assets | /favicon.ico | Asset serving broken, wiki loads blank |
TiddlyWiki on Node.js is refreshingly simple to run, but its file-based storage model means the most dangerous failures are invisible at the HTTP level. With Vigilmon watching the write path, the backup directory, and the WebSocket layer, you'll catch problems before they become data loss.