Skip to content
CaloptreyxPublic

About

Self-hosted distributed uptime monitoring, multi-region quorum checks, game server telemetry, and customizable status pages.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Uptime

Self-hosted, distributed uptime monitoring and status page platform built with Rust (Axum + SQLx), PostgreSQL + TimescaleDB, Better Auth (Server Admin + Organizations RBAC + OIDC/SSO + TOTP 2FA), and React 19 + Vite + Tailwind CSS v4.

Features

  • 17 Native Monitor Types
    • Web & Synthetic: HTTP(S) (DNS/TCP/TLS/TTFB phase breakdown + automatic TLS cert inspection & staged expiry alerts), HTTP Keyword, HTTP JSON Path assertions, Multi-Step Synthetic HTTP (chained requests with {{var}} extraction), External Status Feed (Statuspage.io, Instatus, Uptime/UptimeKit)
    • Network & Protocol: TCP (optional TLS + banner send/expect), UDP (UTF-8 or hex: payload/expect), ICMP Ping, gRPC Health (grpc.health.v1.Health/Check), DNS (A/AAAA/CNAME/MX/TXT/NS/SRV/CAA + custom resolver)
    • Game Servers: Minecraft Java (SLP), Minecraft Bedrock (RakNet), Valve Source / Steam A2S (CS2, Rust, ARK, TF2, Palworld), FiveM
    • Security & Passive Push: Heartbeat / Cron Push dead-man's switch (/api/v1/heartbeat/:token), SSL/TLS Certificate Expiry, Domain Expiry (RDAP)
  • Distributed Multi-Region Rust Probes (uptime-probe)
    • Persistent WebSocket control plane (/ws/probe) with instant monitor assignment push & TriggerNow
    • Durable JSONL disk spooling so check results survive server/network outages
    • Multi-region quorum, stale-region awareness, and consecutive failure confirmation to eliminate false positives
  • Customizable Public & Private Status Pages
    • Visual Structure & Categories editor (choose which monitors appear under which collapsible group with live group rollups)
    • 4 Layout Themes (Classic, Signal, Flat, Spark), 7 Color Palettes (Forest, Dark, Slate, Terminal, Light, Minimal Light, System), 3 Bar Styles (Bars, Signal, Blocks), 30/60/90-day history range, 0–6 decimal precision, custom favicon & CSS
    • Custom domains (Host / X-Forwarded-Host), Argon2id password protection with brute-force lockout, email + HMAC webhook subscribers, /summary.json, /badge.svg, and /rss.xml
  • Multi-Tenant Auth, SSO & Security
    • Server Admin (first registered user automatically promoted) + Organizations (owner, admin, member)
    • Generic OIDC/SSO (Authentik, Keycloak, Pocket ID, Okta, Entra ID), GitHub & Google OAuth, TOTP 2FA with backup codes, and scoped organization API tokens
  • Alerting, Maintenance & Observability
    • Discord, Slack, Telegram, HMAC-SHA256 Webhooks (X-Uptime-Signature), ntfy, SMTP, Apprise, and Google Chat
    • Inbound Prometheus AlertManager v4 webhook receiver & outbound Prometheus /metrics endpoint
    • Scheduled maintenance windows with automatic alert suppression & subscriber notices
    • Uptime Kuma, UptimeKit & native declarative JSON importer + GitOps CLI (uptime export, diff, apply, import)

Deploy on Coolify (Recommended — 1-Click Docker Compose)

Uptime ships with a dedicated docker-compose.coolify.yml using prebuilt container images from GitHub Container Registry (ghcr.io/caloptreyx/uptime-*) and Coolify magic variables (auto-generated Postgres password, Better Auth secret, probe token, and domain).

Option A: Deploy directly from GitHub in Coolify

  1. In Coolify, go to Projects → + Add Resource → Public Repository.
  2. Enter https://github.com/Caloptreyx/uptime (branch main).
  3. Set Build Pack to Docker Compose and Docker Compose Location to /docker-compose.coolify.yml.
  4. Open the server service settings and set your domain (for example https://uptime.yourdomain.com:4100).
  5. Click Deploy.

Option B: Paste Docker Compose in Coolify

  1. In Coolify, go to Projects → + Add Resource → Docker Compose Empty.
  2. Paste the contents of docker-compose.coolify.yml.
  3. Attach your domain to the server service (port 4100) and click Deploy.

Custom Status Page Domains on Coolify: Add additional domains (e.g. https://status.yourdomain.com:4100) to the server service in Coolify so Traefik provisions TLS and forwards Host / X-Forwarded-Host to Uptime, then set status.yourdomain.com in the Status Page's Custom Domain field.


Deploy with Docker Compose, Dokploy, or Portainer

Docker Compose (Prebuilt Images)

curl -fsSLO https://raw.githubusercontent.com/Caloptreyx/uptime/main/docker-compose.yml
curl -fsSLO https://raw.githubusercontent.com/Caloptreyx/uptime/main/.env.example
cp .env.example .env
# Edit .env: set PUBLIC_URL, POSTGRES_PASSWORD, BETTER_AUTH_SECRET, BOOTSTRAP_WORKER_TOKEN
docker compose up -d

Open http://localhost:4100 (or your PUBLIC_URL) and register the first account — it is automatically promoted to Server Admin and Default Workspace Owner.

Dokploy / Portainer

  1. Create a new Compose stack using docker-compose.yml from https://github.com/Caloptreyx/uptime.
  2. Set PUBLIC_URL, POSTGRES_PASSWORD, BETTER_AUTH_SECRET, and BOOTSTRAP_WORKER_TOKEN in the stack environment variables.
  3. Point your reverse proxy / Dokploy domain to service server on port 4100.

Build from Source Locally

cp .env.example .env
docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build

Render

A starter render.yaml Blueprint is included (bring your own Postgres + TimescaleDB connection string via DATABASE_URL).


Adding Remote Regional Probes

  1. Open Workers in the Uptime dashboard and click Enroll Worker (choose a region such as us-east, eu-central, ap-south).
  2. Run the generated Docker command on any remote VPS or Coolify host:
docker run -d --restart unless-stopped --name uptime-probe-eu-central \
  -e UPTIME_SERVER_URL="wss://uptime.yourdomain.com/ws/probe" \
  -e UPTIME_WORKER_TOKEN="pgw_..." \
  -e UPTIME_REGION="eu-central" \
  ghcr.io/caloptreyx/uptime-probe:latest

Or deploy docker-compose.probe.yml on Coolify / Docker with UPTIME_SERVER_URL, UPTIME_WORKER_TOKEN, and UPTIME_REGION.


Container Images

Image Description
ghcr.io/caloptreyx/uptime-server:latest Rust Axum API server, TimescaleDB migrations, WebSocket probe hub, and React SPA
ghcr.io/caloptreyx/uptime-auth:latest Better Auth service (RBAC, Organizations, OIDC/SSO, TOTP 2FA)
ghcr.io/caloptreyx/uptime-probe:latest Distributed regional probe agent with durable disk spooling

Key Environment Variables

Variable Service Description
PUBLIC_URL server, auth Public HTTPS URL (auto-detected from Coolify SERVICE_URL_SERVER_4100, Render, Railway; auto-added to CORS/trusted origins)
DATABASE_URL server, auth PostgreSQL + TimescaleDB connection string
BETTER_AUTH_SECRET auth, server Random 32+ byte signing secret
BOOTSTRAP_WORKER_TOKEN server, probe Token for the bundled global probe worker
PORT / SERVER_BIND server HTTP listen port/bind address (default 0.0.0.0:4100)
OIDC_CLIENT_ID / OIDC_DISCOVERY_URL auth Enable OIDC/SSO login (Authentik, Keycloak, Pocket ID, Okta, Entra)
TWO_FACTOR_ISSUER auth Authenticator app issuer name (default Uptime)
METRICS_TOKEN server Optional bearer token for Prometheus /metrics
SMTP_HOST, SMTP_PORT, SMTP_FROM server Optional instance-level SMTP for status page email subscribers

See .env.example for the complete list.


Local Development

# 1. Start TimescaleDB (expose port 5439 locally if developing outside Docker)
docker run -d --name uptime-dev-db -p 127.0.0.1:5439:5432 \
  -e POSTGRES_USER=pulsegrid -e POSTGRES_PASSWORD=pulsegrid_dev -e POSTGRES_DB=pulsegrid \
  timescale/timescaledb:latest-pg17

# 2. Start Better Auth service (port 4101)
cd services/auth && pnpm install && pnpm dev

# 3. Start Rust API Server (port 4100)
cargo run -p pulsegrid-server

# 4. Start Rust Probe Agent
UPTIME_WORKER_TOKEN=pgw_dev_local_probe_token_change_me cargo run -p pulsegrid-probe

# 5. Start React/Vite Dev UI (port 5173)
cd web && pnpm install && pnpm dev

License

MIT — see LICENSE.

About

Self-hosted distributed uptime monitoring, multi-region quorum checks, game server telemetry, and customizable status pages.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages