Why You Need a Free Server Probe System
If you manage more than three VPS instances scattered across different data centers and regions, you've probably experienced this: a server goes down and you have no idea until a customer complains or you discover the service has been offline for hours.
Traditional solutions fall into two categories: paying for commercial monitoring services like UptimeRobot, or building your own Prometheus + Grafana stack. The former has limited features on free plans, and the latter requires maintaining an additional monitoring server. Neither is ideal for individual developers or small teams.
CF-Server-Monitor offers a smarter alternative: a multi-server monitoring system that runs entirely on Cloudflare's free tier. No servers to maintain, no subscriptions to pay for — the dashboard, API, database, and real-time push all run on Cloudflare's edge network. With 1,500+ GitHub stars, it has been widely adopted by VPS enthusiasts and small teams.
Project Overview: What Is CF-Server-Monitor
CF-Server-Monitor is a lightweight multi-server monitoring dashboard deployed on Cloudflare Workers. Its core tech stack includes:
- Cloudflare Workers: Edge compute functions handling API requests and Agent reports
- Cloudflare D1: Edge SQLite database for persistent monitoring data storage
- Durable Objects: Stateful objects providing real-time WebSocket push to the frontend
- Vue.js Frontend: Responsive monitoring dashboard and admin panel
- Go Agent: Lightweight probe installed on monitored servers
The design philosophy is simple: Agents report metrics one-way to Workers, Workers write to D1 and broadcast to the frontend. No WebSSH, no remote command execution, no control channel — making it more secure than traditional probes.
Core Features
| Module | Capabilities |
|---|---|
| Real-time monitoring | CPU, GPU, memory, swap, disk, disk IO, network, connections, processes, load, uptime |
| Historical data | 7-day charts, long-range sampling, real-time network speed, monthly traffic stats |
| Network quality | Latency and packet loss tracking for CT, CU, CM, and BGP nodes |
| Dashboard views | Bar chart, ring chart, table, and map views for desktop and mobile |
| Admin panel | Server CRUD, drag sorting, hidden servers, import/export, batch operations |
| Cross-platform Agent | Linux, Alpine, OpenWrt, Synology DSM, fnOS, FreeBSD, macOS, Windows |
| Real-time push | Durable Objects + WebSocket for instant UI refresh |
| Alert notifications | Offline alerts, recovery notices, expiration reminders, resource load alerts |
| Theme ecosystem | Built-in themes, theme store, third-party theme proxy and preview |
| Multi-language | Built-in Chinese and English frontend |
Why Cloudflare Workers + D1
Zero-Cost Operation
Cloudflare's free tier is generous:
- Workers: 100,000 requests per day
- D1: 5 million row reads and 100,000 row writes per day
- Durable Objects: 100,000 requests per day
CF-Server-Monitor is specifically optimized for these limits: the default 60-second reporting interval supports approximately 60 servers, and switching to 120 seconds can theoretically double that capacity. History queries use sampling strategies, monthly data tables rotate automatically, and caching with rate limiting ensures you stay within free-tier limits.
Global Edge Computing
Cloudflare has edge nodes in 300+ cities worldwide. Workers run on the node closest to users, providing extremely low API latency. D1 databases are also edge-based, with reads and writes completing at the edge without returning to a central server.
Maintenance-Free
No servers to patch, no Docker containers to restart, no databases to back up. Cloudflare hosts all the infrastructure — you only need to focus on the servers being monitored.
Comparison with Other Monitoring Tools
| Feature | CF-Server-Monitor | UptimeRobot | Prometheus + Grafana | Netdata |
|---|---|---|---|---|
| Cost | Free (Cloudflare free tier) | Free for 50 monitors | Free (requires server) | Free (requires server) |
| Own server needed | No | No | Yes | Yes |
| Server metrics | Full CPU/memory/disk/network | HTTP status only | Full (requires config) | Full |
| Real-time push | WebSocket instant | Polling | Requires extra config | Real-time |
| Maintenance | Zero (Cloudflare hosted) | Zero | High (server maintenance) | Medium |
| Offline alerts | Telegram/WeChat/DingTalk etc. | Limited | Requires Alertmanager | Supported |
| Historical data | 7 days | Plan-dependent | Unlimited (storage-dependent) | Limited |
| Security | One-way reporting, no remote channels | N/A | Requires hardening | WebSSH risk |
For individual developers and small teams with multiple VPS instances, CF-Server-Monitor has clear advantages in cost and convenience. If you need petabytes of historical data or enterprise-grade SLA, Prometheus + Thanos may be more suitable.
Architecture Deep Dive
┌─────────────────┐ POST /update ┌──────────────────────┐
│ Server Agent │ ───────────────────> │ Cloudflare Worker │
│ (Go/Shell/PS) │ │ (Edge Function) │
└─────────────────┘ └──────────┬───────────┘
│
┌───────────┼───────────┐
│ │ │
┌────▼───┐ ┌────▼────┐ ┌───▼────┐
│ D1 │ │Durable │ │ Vue │
│ SQLite │ │Objects │ │Dashboard│
│ DB │ │WebSocket│ │ │
└────────┘ └────┬────┘ └───┬────┘
│ │
┌────▼──────────▼───┐
│ Browser/Mobile │
│ Real-time Display │
└───────────────────┘
Core data flow:
- Add a server in the admin panel and copy the install command
- Install the Agent on the target server; it reports metrics to the Worker at the configured interval
- Worker verifies
API_SECRET, writes to D1, and broadcasts real-time data via Durable Objects - The dashboard, detail pages, admin panel, and iOS widget all read from the same API
Deployment Guide: Building Your Monitoring System from Scratch
Prerequisites
- A Cloudflare account (free tier works)
- A GitHub account
- A strong
API_SECRET(used as both Agent reporting key and initial admin password)
Option 1: Cloudflare Workers Connected to GitHub (Recommended)
This is the most hassle-free deployment method, with easy updates.
Step 1: Fork the Repository
Visit the CF-Server-Monitor GitHub repo and click Fork.
Step 2: Create a Worker
- Log in to Cloudflare Dashboard
- Go to Workers & Pages
- Click "Create Worker"
- Select "Connect GitHub repository" and import your forked repo
Step 3: Configure Build
- Build command:
npm run build:frontend - Deploy command:
npx wrangler deploy
Step 4: Add Environment Variables
In the Worker's Variables and Secrets, add:
| Variable | Value | Description |
|---|---|---|
API_SECRET |
Your strong password | Agent reporting key + initial admin password |
Step 5: Deploy
Click deploy and wait for the build to complete. You'll get a xxx.workers.dev domain.
Option 2: GitHub Actions Deployment
For users who want to manage deployment entirely through GitHub.
- Fork the repository
- Create a D1 database in Cloudflare (name it
server-monitor-db) - Copy your Cloudflare Account ID
- Create a Cloudflare API Token (needs Workers edit and D1 deploy permissions)
- Add these secrets in your forked repo's Settings → Secrets → Actions:
CF_API_TOKEN: Your Cloudflare API Token
CF_ACCOUNT_ID: Your Cloudflare Account ID
D1_DATABASE_ID: Your D1 Database ID
API_SECRET: Your strong password
CORS_ALLOWED_ORIGINS: (Optional) Allowed cross-origin sources
Pushing to main triggers automatic deployment.
Option 3: One-Click Deploy
One-click deploy is great for quick trials, but migrate to Option 1 or 2 for long-term use.
First Steps: Admin Login and Adding Servers
Admin Panel Login
After deployment, visit:
https://your-worker-domain/admin#/admin
Default credentials:
- Username:
admin - Password: Your
API_SECRET
Change the admin username and password immediately after login. The admin password can be separated from API_SECRET — Agent reporting still uses the environment variable, but the admin panel can have its own credentials.
Adding Your First Server
- Go to
/admin#/admin - Enter a server name in "Server Management"
- Click "Add Server"
- Click the copy button, select the target system and Agent version
- Run the generated command on the target server
The admin-generated command automatically includes server ID, Worker URL, Secret, reporting interval, and other parameters — more reliable than manual configuration.
Monitored Server Configuration: Agent Installation and Data Reporting
Go Agent (Recommended)
Since v2.8.3, the default Agent is the standalone cfsm-agent (written in Go). The installed service is named cf-probe.
Non-root Installation (Recommended)
On Linux systems with systemd --user support, install as a regular user:
# Switch to regular user
su - youruser
# Run the admin-generated install command (example)
curl -sSL https://your-worker.example.com/install | bash -s -- \
-id 1 \
-secret "your-api-secret" \
-url "https://your-worker.example.com" \
-interval 60
Files are written to ~/.cf-probe/, with systemd --user managing autostart.
To keep the service running after logout:
# Run as root
loginctl enable-linger youruser
Agent Parameters
| Parameter | Description | Default |
|---|---|---|
-id |
Unique server ID | Required |
-secret |
Agent reporting secret (must match API_SECRET) |
Required |
-url |
Worker reporting URL | Required |
-collect_interval |
Local extra collection interval; 0 disables |
0 |
-interval |
Reporting interval (seconds) | 60 |
-ct / -cu / -cm / -bd |
Custom network quality test nodes | Built-in |
-reset_day |
Monthly traffic reset day | 1 |
-rx_correction |
Download traffic correction (GB) | Empty |
-tx_correction |
Upload traffic correction (GB) | Empty |
Supported Platforms
- Linux: Ubuntu, Debian, CentOS, Rocky Linux, AlmaLinux, and more
- Alpine Linux: Uses OpenRC
- OpenWrt: Router-friendly
- Synology DSM: NAS monitoring
- fnOS: Domestic NAS system
- FreeBSD: BSD family support
- macOS: Development machine monitoring
- Windows: PowerShell version
Dashboard Features
Real-time Status Display
The dashboard supports four view modes:
- Bar chart mode: Intuitive display of CPU/memory/disk usage across servers
- Ring chart mode: Compact display for many servers
- Table mode: Detailed data list with sorting and filtering
- Map mode: Geographic distribution of servers
All modes are responsive for desktop and mobile.
Historical Data and Charts
- 7-day history charts: Time series for CPU, memory, disk, and network traffic
- Long-range sampling: History queries use sampling to avoid D1 quota issues
- Real-time network speed: Upload/download rate curves
- Monthly traffic stats: Traffic reset day and upload/download correction support
Network Quality Monitoring
Tracks latency and packet loss for four network types (CT, CU, CM, BGP). When three-net details are enabled, the dashboard samples up to 20 real data points from the last 2 hours of D1 history, cached for 5 minutes.
Alert Notifications
Configure in Admin → Global Settings → Notifications. Supported channels:
| Platform | Configuration |
|---|---|
| Telegram | BotFather Bot Token + Chat ID |
| WeCom | Group robot Webhook URL |
| Feishu | Group robot Webhook URL |
| DingTalk | Custom robot Webhook URL |
| Bark | https://api.day.app/xxxx/ |
| ServerChan | https://sctapi.ftqq.com/<SendKey>.send |
| Gotify | https://gotify.example.com/message?token=xxx |
| Custom Webhook | Any HTTP POST endpoint |
Alert types include: offline alerts, recovery notices, expiration reminders, and resource load alerts.
Advanced Configuration
Custom Domain
Bind a custom domain to your Worker in Cloudflare Dashboard:
- Go to Worker Settings → Triggers
- Add a custom domain (e.g.,
monitor.yourdomain.com) - Cloudflare handles SSL certificates and DNS automatically
Multi-Worker Aggregation
If you have multiple Worker instances (across different Cloudflare accounts), aggregate them via API_BASE:
API_BASE: "https://worker1.example.com,https://worker2.example.com"
The frontend requests all Workers and merges the display.
GitHub Pages Static Frontend
Build the frontend as a static site for GitHub Pages, fetching data from remote Worker APIs:
npm run build:github-page
Configure API_BASE in GitHub Secrets to point to your Worker.
iOS Scriptable Widget
The project includes an iOS Scriptable widget script for displaying server status on your iPhone home screen:
- Install the Scriptable app
- Create a new script and paste the contents of
scripts/ios-scriptable-widget.js - Modify
CONFIG.baseURLat the top to your site URL - Add a Scriptable widget with the server ID as Parameter
The widget shows online status, CPU, memory, disk, monthly traffic, real-time speeds, and update time.
Security Hardening
- Turnstile verification: Enable Cloudflare Turnstile in admin security settings
- CORS whitelist: Restrict API access sources via
CORS_ALLOWED_ORIGINS - CSP policy: Custom Content Security Policy to prevent XSS
- JWT Secret: Independent JWT signing key, separate from
API_SECRET
Performance Optimization and Cost Control
Cloudflare Free Tier Optimization
CF-Server-Monitor includes several free-tier-friendly designs:
- Monthly table rotation: Historical data is partitioned by month to avoid oversized tables
- Sampled history queries: Long-range queries automatically sample data
- Caching strategy: Network quality data cached for 5 minutes
- Rate limiting: API request frequency limits prevent abuse
Reporting Interval Tuning
| Scenario | Recommended Interval | Supported Servers |
|---|---|---|
| Real-time monitoring (60s) | -interval 60 |
~60 |
| Standard monitoring (120s) | -interval 120 |
~120 |
| Low-power monitoring (300s) | -interval 300 |
~300 |
If you have many servers, increase the reporting interval to 120 seconds or more. For most scenarios, 2-minute monitoring granularity is sufficient.
WSS Reporting Optimization
v2.8.4 introduced WSS (WebSocket Secure) reporting. Agents can use WSS during specific time windows for more timely real-time data push, and automatically fall back to POST outside those windows to reduce Durable Objects duration consumption.
Limitations and Considerations
Free Tier Boundaries
- D1 storage limit: Free D1 databases max out at 500 MB; long-term operation requires periodic history cleanup
- Workers requests: 100,000 requests/day; 60 servers × 60-second interval ≈ 86,400 requests/day, near the limit
- Durable Objects: Free tier has concurrency limits; many simultaneous frontend connections may trigger throttling
Feature Limitations
- 7-day history only: Due to D1 free tier limits, data older than 7 days is sampled or cleaned
- No WebSSH: By design, no remote terminal functionality (which is actually a security plus)
- Cloudflare dependency: If Cloudflare services go down, the monitoring system is also unavailable
Security Recommendations
- Strong password:
API_SECRETmust be a random strong password, never use defaults - Change credentials promptly: Change admin username and password after first login
- Non-root operation: Install the Agent as a non-root user whenever possible
- Regular updates: Follow project updates and upgrade Worker and Agent versions promptly
Conclusion
CF-Server-Monitor is one of the most elegant free server monitoring solutions available. It cleverly leverages Cloudflare's free tier to host the dashboard, API, database, and real-time push entirely on the edge network, achieving true zero-cost, zero-maintenance operation.
Who it's for:
- Individual developers with multiple VPS instances
- Small teams needing lightweight monitoring
- Users who don't want to maintain a monitoring server
- Security-conscious users (one-way reporting, no remote channels)
Who it's not for:
- Enterprise users needing petabytes of historical data
- Users requiring WebSSH and remote command execution
- Production environments with strict SLA requirements
If you're looking for a free, secure, and easy-to-use multi-server monitoring solution, CF-Server-Monitor is worth trying. It may not replace enterprise-grade Prometheus + Grafana setups, but for individual developers and small teams, it's more than good enough.
Project: https://github.com/huilang-me/CF-Server-Monitor Live Demo: https://demo.huilang.me/
Frequently Asked Questions (FAQ)
1. Is CF-Server-Monitor really completely free?
Yes, as long as your monitoring scale stays within Cloudflare's free tier (100,000 Workers requests/day, 5 million D1 reads/day), it costs nothing. The default 60-second reporting interval supports about 60 servers; switching to 120 seconds doubles that.
2. Where is the data stored? Is it secure?
Data is stored in Cloudflare D1 (edge SQLite database), hosted by Cloudflare. The Agent uses one-way reporting — no WebSSH or remote command execution. Even if an Agent is compromised, it cannot reverse-control the server.
3. Which operating systems are supported?
Mainstream Linux distributions (Ubuntu, Debian, CentOS, etc.), Alpine Linux, OpenWrt, Synology DSM, fnOS, FreeBSD, macOS, and Windows. The default Go Agent offers better performance and cross-platform compatibility.
4. How do I receive offline alert notifications?
Configure in Admin → Global Settings → Notifications. Supports Telegram, WeCom, Feishu, DingTalk, Bark, ServerChan, Gotify, and custom Webhooks. Once configured, server offline events trigger instant push notifications.
5. Can I bind a custom domain?
Yes. Add a custom domain in the Worker settings in Cloudflare Dashboard — Cloudflare handles SSL certificates and DNS automatically. You can also deploy the frontend to GitHub Pages with a custom domain.