Kuma - Modern Uptime Monitoring
Kuma is a modern, open-source uptime monitoring service that provides comprehensive monitoring capabilities for websites, APIs, and other services. It's designed to be self-hosted, giving you complete control over your monitoring infrastructure.
🔗 Live Status Page: https://kuma.nergy.space/status/all
What is Kuma?
Kuma is a powerful uptime monitoring solution that allows you to monitor the availability and performance of your services. It provides real-time alerts, detailed status pages, and comprehensive reporting features.
Key Features
- Real-time Monitoring: Monitor HTTP/HTTPS endpoints, TCP ports, DNS queries, and more
- Status Pages: Create beautiful, customizable status pages for your services
- Multi-location Monitoring: Monitor from multiple geographic locations
- Alerting: Get notified via email, Discord, Slack, Telegram, and many other channels
- Dashboard: Clean, modern web interface for managing your monitors
- API: RESTful API for integration with other tools
- Docker Support: Easy deployment with Docker and Docker Compose
Installation
Using Docker Compose (Recommended)
The easiest way to get started with Kuma is using Docker Compose:
version: '3.3'
services:
kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
volumes:
- ./kuma-data:/app/data
ports:
- '3001:3001'
environment:
- UPTIME_KUMA_PORT=3001
restart: unless-stopped
healthcheck:
test:
[
'CMD',
'wget',
'--no-verbose',
'--tries=1',
'--spider',
'http://localhost:3001/api/health',
]
interval: 30s
timeout: 10s
retries: 3
Save this as docker-compose.yml
and run:
docker-compose up -d
Manual Installation
For manual installation, you can use Node.js:
# Clone the repository
git clone https://github.com/louislam/uptime-kuma.git
cd uptime-kuma
# Install dependencies
npm ci --production
# Start the application
npm start
Configuration
Initial Setup
- Access the Web Interface: Navigate to
http://localhost:3001
- Create Admin Account: Set up your first admin user
- Add Monitors: Start adding your first monitoring targets
Environment Variables
Kuma supports various environment variables for configuration:
# Database
UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN=false
UPTIME_KUMA_DISABLE_2FA_OTP=false
# Security
UPTIME_KUMA_DISABLE_2FA_OTP=false
UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN=false
# Performance
UPTIME_KUMA_DISABLE_GZIP=false
UPTIME_KUMA_DISABLE_2FA_OTP=false
Monitor Types
Kuma supports various types of monitoring:
HTTP(s) Monitor
Monitor web applications and APIs:
- URL: The endpoint to monitor
- Method: GET, POST, PUT, etc.
- Headers: Custom headers for authentication
- Body: Request body for POST requests
- Expected Status: Expected HTTP status codes
TCP Port Monitor
Monitor TCP services:
- Host: Server hostname or IP
- Port: TCP port number
- Timeout: Connection timeout in seconds
DNS Monitor
Monitor DNS resolution:
- Hostname: Domain to resolve
- Resolver: DNS server to use
- Record Type: A, AAAA, MX, etc.
Docker Container Monitor
Monitor Docker containers:
- Container Name: Name of the container
- Docker Host: Docker daemon endpoint
Database Monitor
Monitor database connections:
- Type: MySQL, PostgreSQL, MongoDB, etc.
- Host: Database host
- Port: Database port
- Database: Database name
- Username/Password: Authentication credentials
Alerting
Notification Channels
Kuma supports many notification channels:
- Email: SMTP-based email notifications
- Discord: Discord webhook integration
- Slack: Slack webhook integration
- Telegram: Telegram bot notifications
- Webhook: Custom HTTP webhooks
- Pushover: Pushover notifications
- Gotify: Gotify server notifications
- Line: Line messaging
- Matrix: Matrix chat notifications
- Signal: Signal messaging
Alert Configuration
Configure alerts with:
- Notification Delay: Delay before sending alerts
- Retry: Number of retry attempts
- Escalation: Escalation rules for persistent issues
- Maintenance Windows: Scheduled maintenance periods
Status Pages
Creating Status Pages
- Navigate to Status Page: Go to Settings → Status Page
- Create New Page: Click "Add Status Page"
- Configure Settings:
- Title: Page title
- Description: Page description
- Domain: Custom domain (optional)
- Logo: Upload custom logo
- Theme: Choose color scheme
Customization
Status pages can be customized with:
- Custom CSS: Add custom styling
- Custom JavaScript: Add interactive features
- Custom Domain: Use your own domain
- Analytics: Google Analytics integration
API Integration
Kuma provides a RESTful API for integration:
# Get all monitors
curl -X GET "http://localhost:3001/api/monitor" \
-H "Authorization: Bearer YOUR_API_KEY"
# Add a new monitor
curl -X POST "http://localhost:3001/api/monitor" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"name": "My Website",
"type": "http",
"url": "https://example.com",
"interval": 60
}'
Best Practices
Monitor Configuration
- Reasonable Intervals: Don't check too frequently (minimum 30 seconds)
- Multiple Locations: Use different monitoring locations
- Realistic Timeouts: Set appropriate timeout values
- Expected Status Codes: Specify expected HTTP status codes
Alert Management
- Avoid Alert Fatigue: Use appropriate notification delays
- Escalation Rules: Set up escalation for critical services
- Maintenance Windows: Schedule maintenance periods
- Group Notifications: Group related monitors
Performance Optimization
- Database Maintenance: Regular database cleanup
- Monitor Limits: Don't create too many monitors
- Resource Monitoring: Monitor Kuma itself
- Backup Strategy: Regular backups of Kuma data
Troubleshooting
Common Issues
High CPU Usage
- Check monitor intervals
- Reduce number of concurrent monitors
- Optimize database queries
Memory Issues
- Increase container memory limits
- Check for memory leaks
- Monitor resource usage
Database Issues
- Check database connectivity
- Verify database permissions
- Monitor database performance
Logs
Access Kuma logs:
# Docker logs
docker logs uptime-kuma
# Application logs
tail -f /app/data/logs/app.log
Security Considerations
Access Control
- Strong Passwords: Use strong admin passwords
- 2FA: Enable two-factor authentication
- API Keys: Secure API key management
- Network Security: Restrict access to Kuma interface
Data Protection
- Encryption: Use HTTPS for web interface
- Backup Encryption: Encrypt backup data
- Access Logs: Monitor access logs
- Regular Updates: Keep Kuma updated
Conclusion
Kuma is an excellent choice for self-hosted uptime monitoring. It provides all the features you need for comprehensive service monitoring while maintaining full control over your data and infrastructure.
Whether you're monitoring a small personal website or a large enterprise infrastructure, Kuma scales well and provides the tools you need to ensure your services are always available.
Resources
- Official Documentation: https://github.com/louislam/uptime-kuma
- Docker Hub: https://hub.docker.com/r/louislam/uptime-kuma
- Community: GitHub Discussions
- Issues: GitHub Issues
This guide covers the basics of setting up and using Kuma for uptime monitoring. For more advanced features and configurations, refer to the official documentation.