Briefkasten is a self-hosted digital bookmark manager with tag-based organization, full-text search, and a browser extension for quick link saving — a private alternative to Pocket or Pinboard that stores everything in a database you control. But self-hosting means self-monitoring: if the Next.js server goes down, if PostgreSQL becomes unreachable, or if the browser extension's API endpoint stops responding, bookmarks stop saving and you lose access to your entire link library without knowing why. Vigilmon keeps watch over every critical path in Briefkasten — from the web server to the bookmark save API to the full-text search index — so problems surface as alerts rather than as a frustrating gap in your saved links.
What You'll Set Up
- Next.js web server uptime monitor (port 3000)
- PostgreSQL database connectivity monitor
- Bookmark save API endpoint health check
- Full-text search functionality monitor
- Tag management API health check
- Browser extension webhook receiver monitor
- User authentication service check
- TLS certificate expiry alerts
Prerequisites
- Briefkasten running and accessible (default: port 3000)
- PostgreSQL running and connected
- A free Vigilmon account
Step 1: Monitor the Next.js Web Server
The Briefkasten web interface is a Next.js application. Monitoring the root URL confirms the server process is running and serving pages.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - URL:
https://bookmarks.yourdomain.com(orhttp://localhost:3000for a local install). - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
Next.js serves an HTML page for authenticated users and a login redirect for unauthenticated requests. Either way, a 200 or 302 response confirms the server is running. If you want to target a specific status, set the expected value to match what an unauthenticated probe receives from your setup (typically 200 for a login page or 302 for an auth redirect).
Step 2: Monitor PostgreSQL Connectivity
Briefkasten stores all bookmarks, tags, users, and the full-text search index in PostgreSQL. If the database goes down, the web interface becomes non-functional — bookmark loads, searches, and saves all fail.
- Click Add Monitor →
TCP Port. - Host: your PostgreSQL server's hostname or IP (often
localhostif co-located with Briefkasten). - Port:
5432. - Interval:
1 minute. - Save.
If PostgreSQL is on a private network and not reachable from Vigilmon's external probes, use a cron heartbeat instead. Add a script on your server that checks database connectivity and pings Vigilmon on success:
#!/bin/bash
# Verify PostgreSQL is accepting connections
if pg_isready -h localhost -U briefkasten_user -d briefkasten > /dev/null 2>&1; then
curl -s https://vigilmon.online/heartbeat/YOUR_HEARTBEAT_TOKEN
fi
Schedule this with cron every 2 minutes (*/2 * * * *). If PostgreSQL stops accepting connections, the heartbeat stops pinging and Vigilmon alerts after the expected interval.
Step 3: Monitor the Bookmark Save API
The bookmark save endpoint — POST /api/bookmarks — is the most critical API path in Briefkasten. It's called every time you save a link from the browser extension, the web UI, or an import. If this endpoint is degraded, bookmarks are silently lost.
- Click Add Monitor →
HTTP / HTTPS. - URL:
https://bookmarks.yourdomain.com/api/bookmarks - Method:
GET(to check that the route is reachable without needing auth credentials in the probe). - Expected status:
401or405— an authentication challenge or method-not-allowed on a GET to a POST endpoint both confirm the route handler is responding. - Interval:
2 minutes. - Save.
A 401 Unauthorized or 405 Method Not Allowed response is a healthy signal — it means the Next.js route handler for bookmarks is loaded and reachable. A 404 would indicate the route is missing or the application is in a broken state.
Step 4: Monitor Full-Text Search Health
Briefkasten indexes bookmark titles, descriptions, and URLs in PostgreSQL for full-text search. A broken search index means users can't find their saved links — one of the primary use cases for the tool.
- Click Add Monitor →
HTTP / HTTPS. - URL:
https://bookmarks.yourdomain.com/api/bookmarks?search=test - Method:
GET - Add your session cookie or API key header if the search endpoint requires authentication.
- Expected status:
200or401. - Interval:
5 minutes. - Save.
An authenticated probe that receives a 200 with a JSON array (even an empty one for the query "test") confirms the search path through Next.js API → PostgreSQL full-text query is functional. A 500 on this endpoint often indicates a broken database connection or a corrupted search index.
Step 5: Monitor the Tag Management API
Tags are the primary organizational structure in Briefkasten. The tag API handles creating, updating, and listing tags that organize bookmarks into collections.
- Click Add Monitor →
HTTP / HTTPS. - URL:
https://bookmarks.yourdomain.com/api/tags - Method:
GET - Expected status:
200or401. - Interval:
5 minutes. - Save.
Like the bookmarks endpoint, a 401 on this route confirms the handler is alive even without a valid session cookie in the probe. If tag operations start failing (returns 500), it typically indicates a database issue that's also affecting bookmark saves — this monitor provides an early secondary signal.
Step 6: Monitor the Browser Extension Webhook Receiver
The Briefkasten browser extension calls the bookmark save API directly. This is the highest-frequency write path for most users — every "save this page" click hits the API. Monitoring it separately from the web interface ensures the extension's integration point is healthy even when the main UI appears to load.
The browser extension uses the same POST /api/bookmarks endpoint, but it sends requests with an API key or session token rather than a browser cookie.
- Click Add Monitor →
HTTP / HTTPS. - URL:
https://bookmarks.yourdomain.com/api/bookmarks - Method:
GET - Expected status:
401or405. - Interval:
2 minutes. - Save.
This is the same check as Step 3. You can monitor it as a single monitor and note in the monitor description that it covers both the web UI save path and the browser extension webhook receiver. If you have a dedicated extension API path configured in your Briefkasten setup, create a separate monitor for that route.
Step 7: Monitor the Bookmark Import Service
Briefkasten supports importing bookmarks from Netscape HTML bookmark files — the standard format exported by browsers and Pocket. If the import endpoint is broken, users can't migrate their existing bookmark collections.
- Click Add Monitor →
HTTP / HTTPS. - URL:
https://bookmarks.yourdomain.com/api/bookmarks/import - Method:
GET - Expected status:
401or405(the endpoint expects a POST with a file upload — a GET confirms the route exists). - Interval:
10 minutes(import is an infrequent operation; high-frequency checks add little value here). - Save.
Step 8: Monitor User Authentication
Briefkasten uses Next.js authentication (next-auth or a custom session system) to protect the bookmark library. An auth failure means users can't log in even if the rest of the application is working.
- Click Add Monitor →
HTTP / HTTPS. - URL:
https://bookmarks.yourdomain.com/api/auth/session - Method:
GET - Expected status:
200. - Interval:
2 minutes. - Save.
The Next.js auth session endpoint returns 200 with {} for unauthenticated requests — this is a healthy response and confirms the auth service is running. A non-200 response (or a timeout) indicates the auth middleware has crashed or is stuck, which would cause login failures for all users.
Step 9: TLS Certificate Expiry Monitoring
Enable SSL certificate monitoring on your primary Briefkasten HTTPS monitor:
- Open the HTTP monitor for
https://bookmarks.yourdomain.com. - Enable Monitor SSL certificate.
- Set Alert when certificate expires in less than
21 days. - Save.
A Briefkasten instance with an expired certificate breaks the browser extension silently — extensions typically reject TLS errors without displaying a user-visible message, so bookmark saves just stop working with no clear error. A 21-day alert window gives you ample time to renew before users notice.
Step 10: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add your preferred notification target.
- For the web server monitor and the bookmark API monitor, set Consecutive failures before alert to
2— Next.js cold starts on restart can cause a single probe to fail. - For the PostgreSQL TCP monitor, set Consecutive failures before alert to
1— database loss is an immediate full outage. - For the TLS monitor, set Consecutive failures before alert to
1.
Route the PostgreSQL monitor and the main web server monitor to your primary alert channel. Route the tag API, search, and import monitors to a lower-urgency channel — they're important but their failure typically means degraded functionality rather than a complete outage.
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| HTTP uptime | https://bookmarks.yourdomain.com | Next.js process down |
| TCP port 5432 | PostgreSQL | Database unreachable |
| Bookmark save API | GET /api/bookmarks | API handler down, saves failing |
| Full-text search | GET /api/bookmarks?search=test | Search index broken |
| Tag API | GET /api/tags | Tag management broken |
| Import endpoint | GET /api/bookmarks/import | Import route missing |
| Auth session | GET /api/auth/session | Authentication broken |
| SSL certificate | HTTPS endpoint | TLS expiry |
Briefkasten gives you a private, self-hosted bookmark library without relying on third-party services — but that self-hosted control means you own the uptime. With Vigilmon watching the Next.js server, the database, the browser extension API, and the TLS certificate, problems in your bookmark infrastructure surface as an alert before they surface as a frustrating "nothing is saving" moment at the browser extension.