A fast, type-safe, and production-ready uptime monitoring solution built with Go (backend) and Next.js 16 (frontend) with shadcn/ui, Tailwind CSS v4, and Bun.
| Dark Mode | Light Mode |
|---|---|
![]() |
![]() |
![]() |
![]() |
- 5 Monitor Types: HTTP/HTTPS, TCP Port, Ping (ICMP), DNS, Docker Container
- Real-time Updates: WebSocket-based live status updates
- Flexible Intervals: Configure check frequency per monitor (default: 60s)
- Concurrent Execution: Independent goroutines for each monitor
- Automatic Retries: Configurable timeout and retry logic
- Tier 1: Email (SMTP), Webhook, Discord, Slack, Telegram
- Tier 2: Microsoft Teams, PagerDuty, Pushover, Gotify/Ntfy
- Smart Alerts: Only notifies on status changes (up ↔ down)
- Default Notifications: Set global default or per-monitor notifications
- Test Function: Test notifications before deployment
- Public Pages: Beautiful status pages at
/status/{slug} - Password Protection: Optional bcrypt-secured access
- Incident Management: Post announcements with severity levels
- Themes: Light/Dark mode with custom CSS support
- Monitor Selection: Choose which monitors to display
- Uptime Calculator: 24h, 7d, 30d, 90d uptime percentages
- Historical Data: Daily and hourly uptime breakdowns
- Statistics Aggregation: Pre-computed hourly/daily stats for performance
- Prometheus Export:
/metricsendpoint with monitor metrics - Status Badges: SVG badges for status, uptime, and ping
- RESTful API: Complete CRUD for monitors, notifications, status pages
- API Keys: Scoped API keys (read/write/admin) with expiration
- WebSocket API: Real-time heartbeat streaming
- Prometheus: Standard metrics format for monitoring tools
- JWT Authentication: Secure token-based auth
- 2FA Support: TOTP-based two-factor authentication
- Password Hashing: bcrypt for all passwords
- API Key Scoping: Granular permissions (read/write/admin)
- CORS: Configurable cross-origin policies
# Clone the repository
git clone https://github.com/fuomag9/uptime-kabomba
cd uptime-kabomba
# Start both backend and frontend
docker-compose up -d
# Access the web UI
open http://localhost:3000The system runs two services:
- Frontend: Next.js 16 server on port 3000 (publicly accessible)
- Backend: Go API server (only accessible via Docker internal network)
Architecture: The backend is NOT exposed to the host - all API requests are proxied through the Next.js frontend. This ensures the backend is never directly accessible to users, improving security.
Useful Commands:
# View logs
docker-compose logs -f
# View backend logs only
docker-compose logs -f backend
# View frontend logs only
docker-compose logs -f frontend
# Stop services
docker-compose down
# Stop and remove all data
docker-compose down -vPrerequisites:
- Go 1.23+
- Bun 1.x+ (or Node.js 20+)
- PostgreSQL
Backend:
# Install dependencies
go mod download
# Run migrations
export DATABASE_TYPE=postgres
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432
export POSTGRES_DB=uptime
export POSTGRES_USER=uptime
export POSTGRES_PASSWORD=secret
export POSTGRES_SSLMODE=disable
export APP_URL=http://localhost:3000
export JWT_SECRET=your-secret-key
# Build and run
go build -o bin/uptime-kabomba-server ./cmd/server
./bin/uptime-kabomba-serverFrontend:
cd web
bun install
bun run build
bun run start| Variable | Default | Description |
|---|---|---|
DATABASE_TYPE |
postgres |
Database type (postgres) |
DATABASE_DSN |
(optional) | Database connection string (overrides POSTGRES_* vars) |
POSTGRES_HOST |
localhost |
Postgres host |
POSTGRES_PORT |
5432 |
Postgres port |
POSTGRES_DB |
uptime |
Postgres database name |
POSTGRES_USER |
uptime |
Postgres user |
POSTGRES_PASSWORD |
secret |
Postgres password |
POSTGRES_SSLMODE |
disable |
Postgres SSL mode |
PORT |
8080 |
Backend internal port (not exposed to host) |
JWT_SECRET |
required | Secret key for JWT tokens |
APP_URL |
(optional) | Base URL for deriving CORS origins and OAuth redirect |
METRICS_TOKEN |
required | Token required to access /metrics |
HEALTH_TOKEN |
required | Token required to access /health |
PostgreSQL (via env vars):
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=uptime
POSTGRES_USER=uptime
POSTGRES_PASSWORD=secret
POSTGRES_SSLMODE=disable
PostgreSQL (single DSN override):
DATABASE_DSN=postgresql://uptime:secret@localhost:5432/uptime?sslmode=disable
JWT Token (Web UI):
POST /api/auth/login
{
"username": "admin",
"password": "password"
}API Key:
curl -H "X-API-Key: your-api-key" http://localhost:3000/api/monitors
# Or
curl -H "Authorization: Bearer your-api-key" http://localhost:3000/api/monitors# List all monitors
GET /api/monitors
# Create monitor
POST /api/monitors
{
"name": "Example Website",
"type": "http",
"url": "https://example.com",
"interval": 60,
"timeout": 30
}
# Get monitor details
GET /api/monitors/{id}
# Update monitor
PUT /api/monitors/{id}
# Delete monitor
DELETE /api/monitors/{id}
# Get heartbeats
GET /api/monitors/{id}/heartbeats?limit=100
# Get uptime stats
GET /api/monitors/{id}/uptime?period=30d# List notifications
GET /api/notifications
# Create notification
POST /api/notifications
{
"name": "Discord Alert",
"type": "discord",
"config": {
"webhook_url": "https://discord.com/api/webhooks/..."
},
"is_default": true
}
# Test notification
POST /api/notifications/{id}/test
# Get available providers
GET /api/notifications/providers# Create status page
POST /api/status-pages
{
"slug": "my-status",
"title": "My Service Status",
"published": true,
"monitor_ids": [1, 2, 3]
}
# View public status page
GET /status/{slug}# Prometheus metrics
GET /metrics
# Status badge
GET /api/badge/{id}/status
# Uptime badge
GET /api/badge/{id}/uptime?period=30d
# Ping badge
GET /api/badge/{id}/pingMonitors web endpoints with full HTTP support.
Configuration:
- Method: GET, POST, PUT, DELETE, etc.
- Headers: Custom headers
- Body: Request body for POST/PUT
- Status Codes: Expected status codes
- Keywords: Search response for keywords
- TLS: Certificate expiry checking
Checks if a TCP port is open and accepting connections.
Configuration:
- Port: Target port number
Sends ICMP ping packets to check host reachability.
Configuration:
- Packet Count: Number of packets to send
- Packet Size: Size of ping packets
Queries DNS records and validates responses.
Configuration:
- Query Type: A, AAAA, CNAME, MX, NS, TXT
- DNS Server: Custom DNS server (optional)
Monitors Docker container status and health.
Configuration:
- Docker Host: Docker daemon socket path
{
"type": "smtp",
"config": {
"smtp_host": "smtp.gmail.com",
"smtp_port": 587,
"from_email": "[email protected]",
"to_email": "[email protected]",
"smtp_username": "user",
"smtp_password": "pass"
}
}{
"type": "discord",
"config": {
"webhook_url": "https://discord.com/api/webhooks/..."
}
}{
"type": "slack",
"config": {
"webhook_url": "https://hooks.slack.com/services/...",
"channel": "#alerts"
}
}{
"type": "telegram",
"config": {
"bot_token": "123456:ABC-DEF...",
"chat_id": "-1001234567890"
}
}The system runs several automated background jobs:
- Hourly Stats Aggregation (every hour at :05): Aggregates heartbeat data into
stat_hourly - Daily Stats Aggregation (daily at 2:00 AM): Aggregates into
stat_daily - Heartbeat Cleanup (daily at 3:14 AM): Removes heartbeats older than 90 days
- Stats Cleanup (daily at 3:30 AM): Removes stats older than 1-2 years
- Monitor Capacity: Tested with 1000+ concurrent monitors
- Response Time: <100ms API response time (p95)
- WebSocket Latency: <50ms message delivery
- Memory Footprint: Efficient Go runtime (~100MB)
- Heartbeat Write: Optimized for high-throughput writes
uptime-kabomba/
├── cmd/server/ # Application entry point
├── internal/
│ ├── api/ # HTTP handlers & routes
│ ├── auth/ # Authentication logic
│ ├── config/ # Configuration management
│ ├── database/ # Database connection & migrations
│ ├── jobs/ # Background jobs (cron)
│ ├── models/ # Data models
│ ├── monitor/ # Monitor types & executor
│ ├── notification/ # Notification providers
│ ├── uptime/ # Uptime calculator
│ └── websocket/ # WebSocket hub
├── migrations/ # SQL migrations
├── web/ # Next.js frontend
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ ├── hooks/ # Custom React hooks
│ └── lib/ # Utility functions
└── Dockerfile # Docker build configuration
# Backend tests
go test ./...# Backend
CGO_ENABLED=1 go build -a -installsuffix cgo -o uptime-kabomba-server ./cmd/server
# Frontend
cd web
bun install
bun run buildMIT License - See LICENSE file for details
Contributions welcome! Please open an issue or PR.
- Issues: GitHub Issues
- Discussions: GitHub Discussions



