Dufs is a simple, fast, and powerful self-hosted file server written in Rust. It supports WebDAV, HTTP upload and download, directory browsing, and optional authentication — all from a single binary on port 5000. Whether you're using it as a personal cloud drive replacement, a CI artifact store, or a team file share, Dufs sits in the critical path of your file workflows. When Dufs goes down, uploads fail, WebDAV clients disconnect, and automations that depend on file access break silently. Vigilmon keeps Dufs under continuous observation so file access stays reliable.
What You'll Set Up
- HTTP server availability monitor
- TLS/HTTPS certificate expiry alert
- WebDAV endpoint response time monitor
- File upload and download endpoint health checks
- Directory listing service monitor
- Authentication health check (if configured)
- Disk space threshold monitor
- Large file chunked upload service monitor
- Rate limiting middleware monitor
Prerequisites
- Dufs running on port 5000 (or custom port), accessible over HTTP or HTTPS
- A free Vigilmon account
Step 1: Monitor HTTP Server Availability
Dufs serves all requests from a single HTTP listener. Start with a basic availability check on the root path:
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your Dufs URL:
https://files.yourdomain.com/(orhttp://your-server-ip:5000/). - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
Dufs returns a 200 with the directory listing HTML for the root path. If you have authentication enabled, it will return 401 — adjust the expected status or add credentials (see Step 6).
Step 2: Monitor TLS Certificate Expiry
If Dufs is served over HTTPS (either directly with its built-in TLS support or via a reverse proxy), set up certificate expiry monitoring:
- Open the HTTP monitor created in Step 1.
- Enable Monitor SSL certificate under the SSL section.
- Set Alert when certificate expires in less than
21 days. - Click Save.
Dufs supports built-in TLS with --tls-cert and --tls-key flags. Certificates issued by Let's Encrypt auto-renew, but the renewal can fail silently — a 21-day window gives you time to investigate and reissue manually:
# Renew certificate manually (certbot example)
certbot renew --cert-name files.yourdomain.com
# Then restart Dufs to pick up the new certificate
systemctl restart dufs
Step 3: Monitor WebDAV Endpoint Response Times
Dufs fully implements the WebDAV protocol, making it compatible with macOS Finder, Windows network drives, and tools like Cyberduck. The WebDAV PROPFIND method is the standard health probe:
curl -X PROPFIND https://files.yourdomain.com/ \
-H "Depth: 0" \
-H "Content-Type: application/xml" \
-o /dev/null -w "%{http_code} %{time_total}s"
# 207 0.045s
A 207 Multi-Status response is the expected WebDAV success code. Monitor this with a cron heartbeat script:
#!/bin/bash
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-X PROPFIND "https://files.yourdomain.com/" \
-H "Depth: 0")
if [ "$STATUS" = "207" ]; then
curl -s "https://vigilmon.online/heartbeat/WEBDAV_HEARTBEAT_ID"
fi
- In Vigilmon, add a Cron Heartbeat monitor with a
5 minuteinterval. - Schedule the script with cron or systemd timer.
Step 4: Monitor File Upload Health
File upload is Dufs's core function. Verify uploads are working end-to-end with a probe script:
#!/bin/bash
# Create a small test file
echo "vigilmon-probe-$(date +%s)" > /tmp/probe.txt
# Upload to Dufs
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-X PUT "https://files.yourdomain.com/probe.txt" \
-T /tmp/probe.txt)
if [ "$STATUS" = "201" ] || [ "$STATUS" = "204" ]; then
# Clean up
curl -s -X DELETE "https://files.yourdomain.com/probe.txt"
curl -s "https://vigilmon.online/heartbeat/UPLOAD_HEARTBEAT_ID"
fi
rm /tmp/probe.txt
- Add a Cron Heartbeat monitor with a
5 minuteinterval. - Run the script from a cron job every 5 minutes.
A 201 Created or 204 No Content response confirms the upload path (including the underlying filesystem write) is working correctly.
Step 5: Monitor File Download Health
Verify the download path by fetching a known file that you keep permanently in Dufs:
#!/bin/bash
# Download a small probe file that is always present
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
"https://files.yourdomain.com/.probe/ping.txt")
if [ "$STATUS" = "200" ]; then
curl -s "https://vigilmon.online/heartbeat/DOWNLOAD_HEARTBEAT_ID"
fi
Place a small static file at /.probe/ping.txt in your Dufs data directory and keep it permanently. This gives you a stable download target that never changes.
Step 6: Monitor Directory Listing Service
Dufs's directory listing is the primary UI for browser-based file access. Monitor it with a keyword check:
- Add an HTTP / HTTPS monitor.
- URL:
https://files.yourdomain.com/. - Expected status:
200. - Add a Keyword check:
Index ofor any known subdirectory name you expect to appear in the listing. - Interval:
5 minutes.
The keyword check catches cases where Dufs returns a 200 but serves an error page or partial response.
Step 7: Monitor Authentication Health (If Configured)
If you run Dufs with --auth or --allow-all/--allow-upload restrictions, verify that authentication is working correctly:
#!/bin/bash
# Attempt access with valid credentials
VALID_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-u "username:password" \
"https://files.yourdomain.com/")
# Attempt access without credentials (should be denied)
INVALID_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
"https://files.yourdomain.com/")
if [ "$VALID_STATUS" = "200" ] && [ "$INVALID_STATUS" = "401" ]; then
curl -s "https://vigilmon.online/heartbeat/AUTH_HEARTBEAT_ID"
fi
This verifies both that authenticated access works and that unauthenticated access is correctly denied. A misconfiguration that allows unauthenticated access is just as serious as one that blocks all access.
Step 8: Monitor Disk Space
Dufs writes directly to the filesystem. When the disk fills up, uploads fail with HTTP 500 or write errors. Set up a disk space monitor:
#!/bin/bash
# Check disk usage percentage for the Dufs data directory
USAGE=$(df /path/to/dufs/data | awk 'NR==2{print $5}' | tr -d '%')
if [ "$USAGE" -lt 85 ]; then
curl -s "https://vigilmon.online/heartbeat/DISK_HEARTBEAT_ID"
fi
- Add a Cron Heartbeat monitor in Vigilmon with a
10 minuteinterval. - Run the script from cron every 10 minutes.
Set the threshold at 85% to give yourself time to clean up or expand storage before the disk fills completely. At 100% disk usage, new uploads start failing immediately.
Step 9: Monitor Large File Chunked Upload Support
For large files, clients may use chunked transfer encoding. Verify that the Dufs process and the upstream reverse proxy (nginx, Caddy) are not truncating large uploads:
#!/bin/bash
# Generate a 10 MB probe file
dd if=/dev/urandom of=/tmp/probe_large.bin bs=1M count=10 2>/dev/null
# Upload with chunked transfer
STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-X PUT "https://files.yourdomain.com/probe_large.bin" \
-T /tmp/probe_large.bin \
-H "Transfer-Encoding: chunked")
if [ "$STATUS" = "201" ] || [ "$STATUS" = "204" ]; then
curl -s -X DELETE "https://files.yourdomain.com/probe_large.bin"
curl -s "https://vigilmon.online/heartbeat/LARGE_UPLOAD_HEARTBEAT_ID"
fi
rm /tmp/probe_large.bin
Run this check hourly. If your reverse proxy has a client_max_body_size limit that is too low, large uploads will fail with 413 Request Entity Too Large — this check catches that misconfiguration.
Step 10: Configure Alerts and Summary
In Vigilmon, go to Alert Channels and add Slack or email notifications. Recommended thresholds:
- Consecutive failures before alert:
2for the HTTP availability monitor. - Consecutive failures before alert:
1for the upload heartbeat — any upload failure is a critical event. - SSL alert:
21 daysbefore certificate expiry.
| Monitor | Target | What It Catches |
|---|---|---|
| HTTP availability | Root URL | Dufs process down |
| TLS certificate | Root domain | Certificate expiry, HTTPS broken |
| WebDAV PROPFIND | / heartbeat | WebDAV protocol failure |
| File upload | PUT heartbeat | Upload path broken, disk full |
| File download | GET heartbeat | Download path broken |
| Directory listing | Root URL keyword | Partial response, index broken |
| Authentication | Auth heartbeat | Auth bypass or lockout |
| Disk space | df heartbeat | Disk filling, pre-failure warning |
| Chunked upload | Large PUT heartbeat | Proxy body size limit hit |
Dufs is a Rust binary with no external runtime dependencies — it rarely crashes. But the infrastructure around it (disk space, TLS certificates, reverse proxy config, network routing) fails regularly. With Vigilmon checking every layer from TLS to disk usage, you'll catch the surrounding failures before they affect your file workflows.