Skip to content

syofyanzuhad/uptime-kita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Uptime Monitoring

✅ Uptime Kita

Version GitHub Issues or Pull Requests Pull Requests Badge GitHub contributors Uptime

uptime syofyanzuhad dev

"Kita" is the Indonesian word that means "Us"; this means that the uptime can be used for all of us

🥔 Live Demo

U can try the uptime kita demo (Server located on Germany)

⭐ Key Features

  • 🔐 Google Oauth authentication
  • ✅ Monitoring uptime for HTTP(s)
  • 🔒 Certificate check
  • ✨ Fancy, Reactive, Fast UI/UX
  • 📩 Notifications via Email (SMTP), Telegram, Slack, and the others are still in progress
  • 🔔 Real-time toast notifications on public pages via Server-Sent Events (SSE)
  • 📊 Multiple status pages
  • 🐳 Docker support for easy deployment
  • 📈 Server resources monitoring (CPU, Memory, Disk, etc.)
  • 🏷️ Uptime badge for embedding in README/websites

🔧 How to Install

Requirements:

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details on our development workflow, pull request process, and coding standards.

🔧 Installation

  • Clone repository:

    git clone https://github.com/syofyanzuhad/uptime-kita
  • Install PHP dependencies:

    composer install
  • Install javscript dependencies and build assets:

    # install dependencies
    npm install
    
    # build assetes
    npm run build
  • Setup .env file

    # change directory to the uptime-kita
    cd uptime-kita
    
    # copy .env file from .env.example
    cp .env.example .env
    # admin credential
    [email protected]
    ADMIN_PASSWORD=password123
    
    # google oauth https://developers.google.com/identity/protocols/oauth2?hl=id
    GOOGLE_CLIENT_ID=
    GOOGLE_CLIENT_SECRET=
    
    # telegram bot token https://t.me/botfather
    TELEGRAM_BOT_TOKEN=
    
    # email configuration with https://resend.com/
    RESEND_API_KEY=
  • Generate application key:

    php artisan key:generate
  • Update default monitor on database/seeder/monitors/ directory and MonitorSeeder.php file

    - seeders
      |_ monitors
      |  |_monitors.php
      |  |_collages.php
      |_ MonitorSeeer.php
    
        // MonitorSeeder.php
    
        /**
        * Run the database seeds.
        */
        public function run(): void
        {
            $monitors = require database_path('seeders/monitors/monitors.php');
            $collages = require database_path('seeders/monitors/collage.php');
    
            // others code
        }
  • Create databases:

    touch database/database.sqlite
    touch database/queue.sqlite
    touch database/telescope.sqlite
  • Run migration and seeder (this will prompt to create database.sqlite file if it doesn't exists)

    php artisan migrate --seed --force
  • Run the scheduler using cron job:

    # open cron configuration
    crontab -e
    # copy this text to the end of line (change the path to your project path)
    * * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1

    Read more about laravel scheduler

  • There are 2 ways to run the background job:

    1. Laravel Queue

      # install supervisord
      sudo apt-get install supervisor
      
      # add new file on /etc/supervisor/conf.d directory
      touch /etc/supervisor/conf.d/laravel-worker.conf
      # copy this text (change the path to your project path)
      [program:laravel-worker]
      process_name=%(program_name)s_%(process_num)02d
      command=php /home/path-to-project/artisan queue:work sqs --sleep=3 --tries=3 --max-time=3600
      autostart=true
      autorestart=true
      stopasgroup=true
      killasgroup=true
      user=forge
      numprocs=8
      redirect_stderr=true
      stdout_logfile=/home/forge/app.com/worker.log
      stopwaitsecs=3600

      Read more about laravel queue

    2. Laravel Horizon

      # install supervisord
      sudo apt-get install supervisor
      
      # add new file on /etc/supervisor/conf.d directory
      touch /etc/supervisor/conf.d/horizon.conf
      # copy this text (change the path to your project path)
      [program:horizon]
      process_name=%(program_name)s
      command=php /home/path-to-project/artisan horizon
      autostart=true
      autorestart=true
      user=forge
      redirect_stderr=true
      stdout_logfile=/home/path-to-project/horizon.log
      stopwaitsecs=3600
      sudo supervisorctl reread
      
      sudo supervisorctl update
      
      sudo supervisorctl start horizon

      Read more about laravel horizon

Note

change the path to your project path

🐳 Docker Deployment

You can deploy Uptime Kita using Docker for easier setup and production deployment.

Quick Start with Docker

# Build the image
docker build -t uptime-kita .

# Run with docker-compose
docker compose up -d

Docker Compose

# Production
docker compose up -d

# Development (with hot reload)
docker compose --profile dev up -d

Environment Variables

Create a .env file or pass environment variables to the container:

APP_NAME=Uptime-Kita
APP_ENV=production
APP_KEY=base64:your-key-here
APP_URL=https://your-domain.com

The Docker image includes:

  • Nginx web server
  • PHP-FPM
  • Supervisor for process management
  • Cronless scheduler (no cron required)
  • Queue workers

Cronless Scheduler

For environments without cron access (like some Docker/container setups), use the cronless scheduler:

# Run directly
php artisan schedule:run-cronless-safe

# With options
php artisan schedule:run-cronless-safe --frequency=60 --max-memory=256 --max-runtime=86400

Options:

  • --frequency=60: Check interval in seconds (default: 60)
  • --max-memory=512: Maximum memory in MB before restart (default: 512)
  • --max-runtime=86400: Maximum runtime in seconds before restart (default: 24 hours)

See TROUBLESHOOTING-CRONLESS.md for troubleshooting tips.

📈 Server Resources Monitoring

Monitor your server's health in real-time from the Settings page.

Features

  • CPU Usage: Current usage percentage and core count
  • Memory: Total, used, and free memory with usage percentage
  • Disk: Storage usage for the application directory
  • Server Uptime: How long the server has been running
  • Load Average: 1, 5, and 15-minute load averages
  • PHP Info: Version, memory limit, loaded extensions
  • Laravel Info: Version, environment, debug mode status
  • Database: Connection status and size
  • Queue: Driver, pending and failed jobs count
  • Cache: Driver and status

Access

Navigate to Settings > Server Resources to view the monitoring dashboard.

The page auto-refreshes every 5 seconds (configurable), with color-coded progress bars:

  • 🟢 Green: < 70% usage
  • 🟡 Yellow: 70-90% usage
  • 🔴 Red: > 90% usage

🏷️ Uptime Badge

Embed an uptime badge in your README or website to show your service status.

Usage

![Uptime](https://your-uptime-instance.com/badge/your-domain.com)

Parameters

Parameter Description Default
period Time period for uptime calculation 24h

Available periods: 1h, 24h, 7d, 30d, 90d

Examples

<!-- Default 24h uptime -->
![Uptime](https://uptime.syofyanzuhad.dev/badge/syofyanzuhad.dev)

<!-- 7-day uptime -->
![Uptime](https://uptime.syofyanzuhad.dev/badge/syofyanzuhad.dev?period=7d)

<!-- 30-day uptime -->
![Uptime](https://uptime.syofyanzuhad.dev/badge/syofyanzuhad.dev?period=30d)

Badge Appearance

The badge shows:

  • Label: "uptime {period}" (e.g., "uptime 24h")
  • Value: Uptime percentage (e.g., "99.9%")
  • Color: Green (>= 99%), Yellow (>= 95%), Red (< 95%)

🔔 Real-time Status Notifications

Public monitor pages display instant toast notifications when a monitor's status changes (up → down or down → up).

How It Works

The feature uses Server-Sent Events (SSE) for efficient real-time updates:

  1. When a monitor status changes, the event is broadcast to connected clients
  2. Public pages automatically subscribe to the SSE stream
  3. Toast notifications appear instantly without page refresh
  4. Connections auto-reconnect with exponential backoff if disconnected

Supported Pages

  • Public Monitor List (/monitors/public) - All public monitors
  • Public Monitor Detail (/monitors/{id}/public) - Specific monitor
  • Status Pages (/status/{slug}) - Monitors on that status page

Toast Appearance

  • 🟢 Green toast: Service recovered (down → up)
  • 🔴 Red toast: Service down (up → down)
  • Auto-dismiss after 8 seconds with progress bar
  • Manual dismiss via close button

Technical Details

  • SSE endpoint: /api/monitor-status-stream
  • Heartbeat: Every 30 seconds
  • Max connection duration: 5 minutes (auto-reconnect)
  • Rate limited: 10 requests per minute

🛣️ Roadmap

  • Uptime monitoring
  • SSL Monitoring
  • Monitoring history
  • Notification:
    • Email
    • Telegram
    • Slack
    • Discord
  • Status page
  • Docker deployment
  • Server resources monitoring
  • Uptime badge for embedding
  • Cronless scheduler for container environments
  • Real-time toast notifications via SSE
  • Do you have any suggestions?

📸 Screenshots

Private monitors

uptime syofyanzuhad private_monitor_1 uptime syofyanzuhad private_dashboard

Public monitors

uptime syofyanzuhad public_monitor_1 uptime syofyanzuhad public_dashboard

Detail Monitor

uptime syofyanzuhad detail_monitor

Status Page

uptime syofyanzuhad detail_status_monitor uptime syofyanzuhad public_status_syofyan-zuhad

Notification

uptime syofyanzuhad dev_status-pages_1 Screenshot 2025-07-22 at 09 18 08

📊 Activity

Alt

⭐️ Star History

Star History Chart

Uptime Kita is an open-sourced software licensed under the Apache-2.0