Lychee is a beautiful self-hosted photo gallery that gives you full control over your photos — no Google Photos subscription, no privacy concerns, no storage limits beyond your own disk. But photos stored on self-hosted infrastructure are only accessible if that infrastructure stays up. Vigilmon gives you uptime monitoring, API health checks, storage availability alerts, and SSL certificate expiry warnings so your photo gallery is always reachable.
What You'll Set Up
- HTTP uptime monitor for the Lychee web UI
- API health check for the Lychee backend
- Album endpoint response monitoring
- SSL certificate expiry alerts
- Storage availability check via heartbeat
Prerequisites
- Lychee deployed with Docker or LAMP/LEMP stack
- Lychee accessible over HTTPS on a domain
- A free Vigilmon account
Step 1: Monitor the Lychee Web UI
The Lychee web interface is the main entry point for viewing and managing your photo gallery. An HTTP monitor catches web server failures, PHP-FPM crashes, and container restarts:
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Lychee URL:
https://photos.yourdomain.com. - Set Check interval to
5 minutes. - Set Expected HTTP status to
200. - Click Save.
The root URL loads the gallery homepage. If it returns anything other than 200 — a 502 from nginx, a 500 from PHP, or a connection timeout — you get an alert immediately.
Step 2: Check the Lychee API Health Endpoint
Lychee's REST API powers both its own frontend and any third-party clients (LycheeOrg mobile apps, CLI tools). Monitoring the API endpoint separately gives you visibility into the application layer beyond just the web server:
- In Vigilmon, click Add Monitor → HTTP / HTTPS.
- Set the URL to
https://photos.yourdomain.com/api/v2/Session::init. - Set Method to
POST(Lychee's API uses POST for session endpoints). - Set Expected HTTP status to
200. - Set Check interval to
5 minutes. - Click Save.
Verify from the command line:
curl -s -X POST https://photos.yourdomain.com/api/v2/Session::init \
-H "Content-Type: application/json" \
-d '{}'
# → {"user":null,"rights":{"..."},"..."}
A successful response — even for an unauthenticated session initialization — confirms that PHP, the Lychee application, and its database connection are all working.
Step 3: Monitor Album Endpoint Responses
Lychee organizes photos into albums. If your database connection drops or the photo storage becomes unavailable, the album listing endpoint will fail even if the homepage still renders:
- In Vigilmon, click Add Monitor → HTTP / HTTPS.
- Set the URL to
https://photos.yourdomain.com/api/v2/Albums. - Set Method to
GET. - Set Expected HTTP status to
401— an unauthenticated request to the albums API should return 401, confirming the endpoint is active. - Set Check interval to
10 minutes. - Click Save.
A 401 means the API is running and enforcing authentication. A 500 or 503 means something deeper is broken — your database is likely unreachable or the storage mount has disappeared.
Step 4: SSL Certificate Alerts
Photos are personal. Your gallery should always be served over HTTPS, and a lapsed certificate makes the site inaccessible in modern browsers:
- Open the HTTP / HTTPS monitor for
https://photos.yourdomain.com(created in Step 1). - Enable Monitor SSL certificate under the SSL section.
- Set Alert when certificate expires in less than
21 days. - Click Save.
Twenty-one days gives you three weeks to investigate a Let's Encrypt renewal failure and manually trigger renewal before your gallery locks you out:
# Manually renew if auto-renewal failed
certbot renew --force-renewal -d photos.yourdomain.com
# Or with Docker using the official Certbot image
docker run --rm -v /etc/letsencrypt:/etc/letsencrypt certbot/certbot renew
Step 5: Monitor Storage Availability
Lychee stores photos on disk. If the storage volume fills up, unmounts, or becomes inaccessible, new uploads fail silently and existing photos may not load — but the web UI might still appear "up." A storage health check script can ping Vigilmon only when storage is confirmed available:
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set the expected ping interval to
15minutes. - Copy the heartbeat URL.
- Create a script on your server:
#!/bin/bash
STORAGE_PATH="/path/to/lychee/uploads"
HEARTBEAT_URL="https://vigilmon.online/heartbeat/your-token"
# Check storage is mounted and has free space
if [ -d "$STORAGE_PATH" ] && [ "$(df "$STORAGE_PATH" | awk 'NR==2{print $5}' | tr -d '%')" -lt 95 ]; then
curl -s "$HEARTBEAT_URL"
fi
- Make the script executable and add it to cron:
chmod +x /usr/local/bin/lychee-storage-check.sh
crontab -e
Add:
*/15 * * * * /usr/local/bin/lychee-storage-check.sh
If storage fills up or unmounts, the heartbeat stops and Vigilmon alerts you — before your users notice missing photos.
Step 6: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add email, Slack, or a webhook.
- For a personal photo gallery, email is the most natural alert channel — it goes directly to your phone.
- Set Consecutive failures before alert to
2to avoid false alerts from brief server restarts during automatic updates. - Use Maintenance windows before applying Lychee updates or migrating storage volumes.
If you share the gallery with family members, consider adding a webhook to send an SMS via a service like Twilio — that way the person managing the server gets an immediate notification even without checking email.
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web UI | https://photos.yourdomain.com | Frontend unavailable |
| Session API | /api/v2/Session::init (POST, 200) | PHP / DB failure |
| Albums API | /api/v2/Albums (GET, expect 401) | Application layer error |
| SSL certificate | Your Lychee domain | Certificate expiry |
| Storage heartbeat | Heartbeat URL | Disk full / unmounted storage |
Lychee lets you own your photo memories completely — but self-hosting means you own the reliability too. With Vigilmon checking your gallery's UI, API, album endpoints, storage, and certificates, you'll know the moment something needs attention, long before you (or your family) tries to access a photo and finds the gallery unreachable.