Kuma Mieru

repository·main·Indexed 21 days ago

https://github.com/alice39s/kuma-mieru

A 3rd-party monitoring dashboard for Uptime Kuma (v1.23.0+) built with Next.js 16, TypeScript, and Recharts. It provides enhanced data visualization, including interactive latency charts and real-time status updates, as an alternative to Uptime Kuma's built-in public status pages. Supports deployment via Vercel, Docker Compose, Docker Run, and local installation using Bun.

Tokens
9.8K
Snippets
21
Records
29
Agent score
72%

What's inside kuma-mieru

  1. Overview of Kuma Mieru

    main

    Kuma Mieru is a third-party monitoring dashboard for Uptime Kuma, built using Next.js 16, TypeScript, and Recharts. It addresses limitations in Uptime Kuma's built-in public status pages by providing more intuitive visualizations, such as latency charts.

    Key Features:

    • Real-time Monitoring: Statuses update automatically without manual refreshes.
    • Responsive UI: Built with HeroUI components for modern, device-agnostic layouts.
    • Interactive Charts: Uses Recharts for data visualization, allowing users to interactively view latency and status data for various nodes.
    • Multi-theme Support: Includes Dark, Light, and System themes.
    • Maintenance Announcements: Supports Uptime Kuma's event announcements and status update features.
  2. Handle image loading and security in Kuma Mieru

    main

    Kuma Mieru uses next/image for optimized image loading. This requires managing remote image domains.

    Default Behavior (Low Security)

    By default, STRICT_IMAGE_REMOTE_PATTERNS is set to false. This relaxes the next/image remote domain restrictions to prevent image loading failures caused by dynamic Docker runtime domains.

    High Security Configuration

    If you are running in a high-security environment, you should:

    1. Set STRICT_IMAGE_REMOTE_PATTERNS=true.
    2. Ensure that during the build stage, the generate-image-domains process runs to create a complete whitelist of allowed domains.
  3. Install Kuma Mieru locally using Bun

    main

    To run Kuma Mieru on your local machine, you need Bun installed as the package manager.

    1. Clone the repository:
      git clone https://github.com/Alice39s/kuma-mieru.git
      cd kuma-mieru
    2. Install Bun (if not already installed):
      • Linux/macOS: curl -fsSL https://bun.sh/install | bash
      • Windows: powershell -c "irm bun.sh/install.ps1 | iex"
    3. Install dependencies:
      bun install
    4. Configure environment: Copy .env.example to .env and set your UPTIME_KUMA_URLS:
      UPTIME_KUMA_URLS=https://your-kuma-instance.com/status/your_status_page_id
      Note: You can provide multiple URLs separated by a pipe |.
    5. Run the application:
      • Development: bun run dev (Access at http://localhost:3883)
      • Production: bun run build followed by bun run start
    git clone https://github.com/Alice39s/kuma-mieru.git
    cd kuma-mieru
    bun install
    cp .env.example .env
    # Edit .env with UPTIME_KUMA_URLS
    bun run dev
  4. Configure Uptime Kuma endpoints via environment variables

    main

    Kuma Mieru can be configured to monitor Uptime Kuma status pages using two different environment variable patterns.

    Provide one or more full status page URLs separated by a pipe (|). This is the most flexible method as it allows monitoring multiple status pages across different base URLs in a single configuration.

    URL Format: https://<domain>/status/<pageId>

    Option 2: Using UPTIME_KUMA_BASE_URL and PAGE_ID

    If you only have one base URL, you can provide the base URL and a list of page IDs. Page IDs should be separated by commas, spaces, or newlines.

    Note: If UPTIME_KUMA_URLS is detected, the UPTIME_KUMA_BASE_URL and PAGE_ID variables are ignored.

    # Option 1: Multiple URLs (Pipe separated)
    UPTIME_KUMA_URLS="https://status.example.com/status/page1|https://status.other.com/status/page2"
    
    # Option 2: Single Base URL + Multiple IDs (Comma/Space separated)
    UPTIME_KUMA_BASE_URL="https://status.example.com"
    PAGE_ID="page1, page2, page3"
  5. Deploy Kuma Mieru to Vercel (Recommended)

    main

    The recommended way to deploy Kuma Mieru is via Vercel. This method uses environment variables for configuration, ensuring your sensitive data is not leaked in your public fork.

    1. Fork the Repository: Fork the Alice39s/kuma-mieru repository to your GitHub account. Ensure the fork is public to allow for easy synchronization with upstream updates.
    2. Import to Vercel: Go to Vercel and import your forked repository.
    3. Configure Environment Variables: You must configure UPTIME_KUMA_URLS for monitoring data to display correctly. While the legacy UPTIME_KUMA_BASE_URL and PAGE_ID combination is supported, using UPTIME_KUMA_URLS is recommended.
    4. Deploy: Click the Deploy button in Vercel.

    To update your deployment: Use the Sync fork and Update branch buttons in your GitHub repository to pull the latest code from the upstream repository.

    Environment Variable:
    UPTIME_KUMA_URLS=https://your-kuma-instance.com/status/your_status_page_id
  6. Local Deployment via Bun

    main

    To run Kuma Mieru locally, you must have Bun installed as the package manager.

    1. Clone the repository:
      git clone https://github.com/Alice39s/kuma-mieru.git
      cd kuma-mieru
    2. Install dependencies:
      bun install
    3. Configure environment variables: Copy the example file to create your local config:
      cp .env.example .env
      Note: You must fill in the required variables in .env (see Environment Variables section).
    4. Start the development server:
      bun run dev
      Access the dashboard at http://localhost:3883.
    5. Production Build: To build and run for production:
      bun run build
      bun run start
    git clone https://github.com/Alice39s/kuma-mieru.git
    cd kuma-mieru
    bun install
    cp .env.example .env
    bun run dev
  7. Deploy using Docker Run

    main

    You can run Kuma Mieru as a standalone container using the image from GHCR.

    1. Pull the image:
      docker pull ghcr.io/alice39s/kuma-mieru:1
    2. Configure environment variables: Create a .env file from .env.example and prioritize setting UPTIME_KUMA_URLS.
    3. Run the container: Use the following command structure (replace values as needed):
      docker run -d \
        --name kuma-mieru \
        -p 3883:3000 \
        -e UPTIME_KUMA_URLS="https://example.kuma-mieru.invalid/status/default|https://example.kuma-mieru.invalid/status/secondary" \
        -e KUMA_MIERU_TITLE="Kuma Mieru" \
        ghcr.io/alice39s/kuma-mieru:1
    docker pull ghcr.io/alice39s/kuma-mieru:1
    
    docker run -d \
      --name kuma-mieru \
      -p 3883:3000 \
      -e UPTIME_KUMA_URLS="https://example.kuma-mieru.invalid/status/default|https://example.kuma-mieru.invalid/status/secondary" \
      -e KUMA_MIERU_TITLE="Kuma Mieru" \
      ghcr.io/alice39s/kuma-mieru:1
  8. Deploy Kuma Mieru using Docker Compose (Recommended)

    main

    For containerized deployment, Docker Compose is the recommended method.

    1. Clone the repository:
      git clone https://github.com/Alice39s/kuma-mieru.git
      cd kuma-mieru
    2. Configure Environment: Create a .env file from the example:
      cp .env.example .env
      Edit .env to include your UPTIME_KUMA_URLS.
    3. Start Services:
      docker compose up -d
      The service will be available at http://0.0.0.0:3883.

    Maintenance Commands:

    • View Logs: docker compose logs -f
    • Update Image: docker compose pull followed by docker compose up -d
    git clone https://github.com/Alice39s/kuma-mieru.git
    cd kuma-mieru
    cp .env.example .env
    # Edit .env
    docker compose up -d
  9. Deploy Kuma Mieru using Manual Docker Run

    main

    You can run Kuma Mieru as a standalone container using the GitHub Container Registry (GHCR) image.

    1. Pull the image:
      docker pull ghcr.io/alice39s/kuma-mieru:1
    2. Run the container: Use the following command, replacing the environment variables with your actual configuration:
      docker run -d \
        --name kuma-mieru \
        -p 3883:3000 \
        -e UPTIME_KUMA_URLS="https://example.kuma-mieru.invalid/status/default|https://example.kuma-mieru.invalid/status/secondary" \
        -e KUMA_MIERU_TITLE="Kuma Mieru" \
        ghcr.io/alice39s/kuma-mieru:1
    docker run -d \
      --name kuma-mieru \
      -p 3883:3000 \
      -e UPTIME_KUMA_URLS="https://example.kuma-mieru.invalid/status/default|https://example.kuma-mieru.invalid/status/secondary" \
      -e KUMA_MIERU_TITLE="Kuma Mieru" \
      ghcr.io/alice39s/kuma-mieru:1
  10. Integrate Kuma Mieru with Uptime Kuma

    main

    To use Kuma Mieru as a dashboard for your Uptime Kuma instance, follow these steps:

    1. Install and configure Uptime Kuma.
    2. Set Timezone: In Uptime Kuma settings, change the Display Timezone to any UTC+0 timezone. This is critical because Uptime Kuma does not pass timezone information to the frontend, and Kuma Mieru automatically converts times to UTC+0 to ensure accuracy.
    3. Create Status Pages: Set up the status pages you wish to display.
    4. Configure Kuma Mieru: Set the UPTIME_KUMA_URLS (or legacy equivalents) in your Kuma Mieru environment configuration.

    Compatibility Note: Kuma Mieru is compatible with Uptime Kuma v1.23.0+. If you are using an older version, please upgrade after backing up your data.

  11. Deploy using Docker Compose (Recommended)

    main

    For containerized deployment, Docker Compose is the recommended method.

    1. Clone the repository:
      git clone https://github.com/Alice39s/kuma-mieru.git
      cd kuma-mieru
    2. Configure environment variables:
      cp .env.example .env
      Ensure you configure the necessary variables in .env.
    3. Start the service:
      docker compose up -d
      The service will run at http://0.0.0.0:3883.
    4. Manage the service:
      • View logs: docker compose logs -f
      • Update image: docker compose pull followed by docker compose up -d
    git clone https://github.com/Alice39s/kuma-mieru.git
    cd kuma-mieru
    cp .env.example .env
    docker compose up -d
  12. Deploy to Vercel (Recommended)

    main

    The easiest way to deploy Kuma Mieru is via Vercel. Follow these steps:

    1. Fork the Repository: Fork this repository to your GitHub account. Ensure the fork is public to allow for easy updates.
    2. Import to Vercel: Go to Vercel New Project and import your forked repository.
    3. Configure Environment Variables:
      • It is highly recommended to use the UPTIME_KUMA_URLS environment variable.
      • The older configuration UPTIME_KUMA_BASE_URL + PAGE_ID is still supported.
    4. Deploy: Click the Deploy button in Vercel.

    To Update: To sync your fork with the latest upstream changes, go to your GitHub repository and click Sync fork, then Update branch.