v1.5.0
quality / commitlint (push) Skipped
CD / update-wiki (push) Successful in 6s
quality / changes (push) Successful in 5s
quality / docker-check (push) Skipped
quality / web (push) Successful in 55s
quality / api (push) Successful in 41s
CD / quality (push) Successful in 1m45s
CD / publish (push) Successful in 1m33s
- Introduced IP health tracking in service views, allowing for detailed monitoring of individual IP statuses and latencies. - Updated the service configuration to include an `ip_health` array, providing structured health data for each IP. - Enhanced the `attachServiceHealth` function to aggregate IP health data alongside overall service health. - Modified relevant components to display IP health information, improving visibility and user experience in service management interfaces. This commit significantly improves the health monitoring capabilities of services, enabling better insights into the status of individual IPs associated with each service.
Cloudflare Domain Manager
Self-hosted service for managing domains, DNS records, and SSL certificates via Cloudflare API.
Features
- Domain and DNS record management (hybrid sync with Cloudflare)
- Domain groups (local / vpn / external) and service tags
- Service groups with common FQDN and DNS-based load balancing (Round Robin / Failover / Weighted)
- Health checks (TCP / HTTP) with automatic DNS reconciliation on status change
- SSL certificate expiry monitoring
- React UI with TanStack Router & Query
- Single Docker container deployment
Quick start
cp .env.example .env
# Edit CLOUDFLARE_API_TOKEN, JWT_SECRET
docker compose up -d
Open http://localhost:8080 — default login admin / admin (dev only).
Stack
- Backend: Node.js 22, Fastify 5, Drizzle ORM, SQLite (
apps/api) - Shared: Zod schemas (
packages/shared), DB layer (packages/db) - Frontend: pnpm monorepo (
apps/web+packages/ui), React, Vite, TanStack Router/Query/Table, shadcn/ui (base-nova), Recharts - CI: Gitea Actions (docs/releasing.md) — quality gates + semantic-release + bake (
cfdm/cloudflare-domain-manager)
Development
pnpm install
pnpm --filter @cfdm/shared build
pnpm --filter @cfdm/db build
# API + SQLite (:8080)
pnpm --filter @cfdm/api dev
# Frontend (:5173, proxies /api → :8080)
pnpm --filter web dev
pnpm turbo build
pnpm turbo test
shadcn CLI: cd apps/web && pnpm dlx shadcn@latest add <component>
Documentation
See docs/Home.md, docs/releasing.md and CONTRIBUTING.md.
Load balancing & health checks
Группа сервисов может иметь общий домен (service_groups.domain). На общем домене и на
привязках сервиса с несколькими A-записями включается балансировка и health-check:
- Режимы LB:
round_robin(по одной A на каждый up-IP),failover(A только для up-IP с минимальным приоритетом; бэкапы подключаются при падении primary),weighted(веса учитываются в БД; в Cloudflare free отображается как Round Robin, т.к. CF API не допускает дубликаты(name, type, content)A-записей — для истинного weighted нужен CF Load Balancer). - Health-check: TCP connect или HTTP (настраиваемый порт, путь, ожидаемый статус,
интервал, таймаут). Результаты хранятся в
ip_health_status(up/degraded/down/unknown) и опрашиваются UI с polling 10с. - Reconcile: при смене статуса IP cron перезаписывает A-записи в Cloudflare, оставляя
только активные по политике LB. Реакция = TTL A-записи (
ttl=1proxied — минимальный).
Env для health-check:
| Variable | Default | Description |
|---|---|---|
HEALTH_CHECK_CRON |
*/30 * * * * * |
Cron выражение для запуска проверок (каждые 30с) |
HEALTH_DEGRADED_FAILURES |
1 |
Порог последовательных ошибок → статус degraded |
HEALTH_DOWN_FAILURES |
2 |
Порог последовательных ошибок → статус down (IP убирается из DNS) |
HEALTH_LATENCY_WARN_MS |
1000 |
Латентность выше порога → degraded даже при успешном connect |