Skip to content

cschanhniem/clawping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ClawPing

Outbound-only monitoring for home servers.

CI License: MIT Go Report Card

Deploy to Cloudflare Workers Built with Cloudflare


The 2 AM Problem

Your NAS is behind CGNAT. No public IP. No port forwarding. Uptime Kuma can't reach it. You have no idea your RAID array degraded three days ago, your Restic backup hasn't run in a week, and your Immich container is in a restart loop.

You find out when your partner asks why the photo gallery is down.

ClawPing solves this by flipping the model: your server reaches out to a lightweight control plane running on Cloudflare's edge. No inbound ports. No dynamic DNS. No VPS to maintain. A 12 MB Go binary that you forget about.

"It just tells me when things break. That's all I wanted."


What It Costs

$0/month.

Runs entirely on Cloudflare's free tier: Workers, D1, KV, Queues, Durable Objects, and Cron Triggers. The agent is a single static binary. Self-hosting this stack costs you nothing but the electricity your server already uses.


How It Works

┌─────────────────────────────────────────────────────────────┐
│  Your home network (CGNAT, no public IP)                    │
│                                                             │
│   ┌──────────────┐    outbound HTTPS    ┌──────────────┐   │
│   │ Go Agent     │ ───────────────────→ │ Cloudflare   │   │
│   │ • disk       │    heartbeat +       │   Workers    │   │
│   │ • HTTP       │    check results     │   D1         │   │
│   │ • Docker     │                      │   DO         │   │
│   │ • backup     │ ←─────────────────── │   Queues     │   │
│   └──────────────┘    Telegram alerts    │   Cron       │   │
│                                          └──────────────┘   │
│                                                   ↓         │
│                                          ┌──────────────┐   │
│                                          │  Telegram    │   │
│                                          └──────────────┘   │
└─────────────────────────────────────────────────────────────┘
  1. Agent runs locally — a single Go binary (12 MB, no dependencies) checks disk, HTTP endpoints, Docker containers, and backup freshness.
  2. Sends outbound heartbeats — over HTTPS to your Cloudflare Worker. Works through any firewall, CGNAT, or VPN.
  3. Control plane on the edge — Cloudflare Workers + D1 + Durable Objects handle state, deduplication, and incident tracking.
  4. Alerts via Telegram — instant, muted when appropriate, with full incident history in the dashboard.

Deploy in 5 Minutes

# 1. Deploy the Worker (one click above, or CLI)
npx wrangler deploy apps/worker

# 2. Install the agent on your server
curl -fsSL https://clawping.app/install.sh | bash

# 3. Open the dashboard and add your device
open https://your-worker.your-subdomain.workers.dev

Or run locally for development:

pnpm install
pnpm worker:dev      # Terminal 1
pnpm dashboard:dev   # Terminal 2

See docs/cloudflare-deploy.md for the full self-deployment path.


Design Philosophy

We made specific architectural choices that might seem unusual. Here's why:

Decision Why
Cloudflare Workers instead of a VPS No server to patch, monitor, or pay for. Edge-deployed means sub-100ms response times globally.
Telegram instead of email/SMS/PagerDuty You already have Telegram open. Push notifications are instant. No third-party API keys or rate limits.
Go agent, not Python/Node Single static binary, 12 MB, no runtime dependencies. Survives OS upgrades. Runs on a Pi Zero.
Durable Objects for deduplication Stateful edge compute means alert throttling without a Redis instance.
D1 instead of Postgres SQLite at the edge. Zero config, zero hosting cost, backups included.
Monorepo with pnpm One pnpm install for the whole stack. Shared types between Worker and dashboard.

Honest Comparison

ClawPing Uptime Kuma Datadog Nagios
Cost $0 $0 (self-hosted) $$$ $ (server)
Inbound ports None Required N/A Required
Agent binary 12 MB Go Node.js stack Heavy Complex
Alert channel Telegram native Webhook/generic Email/PagerDuty Email
Local checks Built-in Limited Requires agent Plugins
Hosting burden None VPS/container None (SaaS) Server
Target user Homelab Homelab/SMB Enterprise Enterprise

This Is Not For You If

  • You need SNMP monitoring, log aggregation, or metrics dashboards with Grafana.
  • You want a hosted SaaS with a support SLA.
  • You're monitoring 1,000 servers across 3 regions.
  • You hate Telegram.

ClawPing is built for people who run a NAS, a mini PC, or a Raspberry Pi at home and want to know when things break without maintaining another server to do it.


What's Included

Control Plane

  • Cloudflare Worker with REST API
  • D1 database for devices, checks, incidents
  • Durable Objects for alert state and deduplication
  • Queues for reliable Telegram delivery
  • Cron Triggers for missed-heartbeat sweeps
  • React dashboard (device management, incident history)

Agent (Go)

  • HTTP/HTTPS reachability checks
  • Disk usage monitoring
  • Docker container health
  • Backup freshness (file age)
  • System info reporting (hostname, uptime, platform)
  • Automatic retry with exponential backoff

Dashboard

  • Device registration with one-line install commands
  • Check configuration (local + cloud)
  • Incident timeline with recovery tracking
  • Telegram bot integration setup

Monorepo Layout

apps/
  worker/         # Cloudflare Worker control plane
  dashboard/      # React dashboard for onboarding and ops
packages/
  shared/         # Shared types, schema helpers, crypto
agent/            # Go agent — single static binary
docs/             # Setup and operational docs
examples/         # Configs for Home Assistant, Immich, Restic

Development

Prerequisites: Node.js 22+ (see .nvmrc), pnpm 10.10.0+, Go 1.26+

# Install everything
pnpm install
cd agent && go mod download

# Run the full validation suite
pnpm lint
pnpm typecheck
pnpm test          # 92 TS tests + Go tests
pnpm build

Test coverage: 92 TypeScript tests across 32 files, Go tests for all agent packages. CI runs lint, typecheck, test, and build on every push.


Documentation

Example configs: Home Assistant · Immich · Restic Backups


Contributing

This project started as a personal tool. If it solves a problem you have, contributions are welcome. See CONTRIBUTING.md.

Bug reports and feature requests go in Issues. For security disclosures, see SECURITY.md.


License

MIT License — see LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors