Automation

Setting Up Uptime Kuma for Self-Hosted Monitoring

Learn how to set up and configure Uptime Kuma for effective self-hosted service monitoring with verified steps.

4 min read

Learn how to set up Uptime Kuma, a free, self-hosted uptime monitoring solution, using Docker Compose. This step-by-step guide will help you deploy and configure the tool to ensure you're notified when services go offline.

Prerequisites for Uptime Kuma Deployment

Before proceeding, ensure you meet the following requirements:

prerequisites

  • A system with Docker installed and running.
  • Docker Compose installed on the system for container management.
  • A separate host system for Uptime Kuma to ensure it can monitor services independently, even if one monitored system goes offline.

Setting Up Uptime Kuma Using Docker Compose

Follow these steps to deploy Uptime Kuma using Docker Compose:

steps

  1. Create a directory to hold Uptime Kuma’s configuration:

    bash
    mkdir uptime-kuma  
    cd uptime-kuma  
  2. Create a docker-compose.yml file inside this directory with the following content:

    yaml
    version: "3"
    services:
      uptime-kuma:
        image: louislam/uptime-kuma:latest
        container_name: uptime-kuma
        ports:
          - "3001:3001"
        volumes:
          - ./data:/app/data
        restart: always
  3. Launch the Uptime Kuma container:

bash
    docker-compose up -d  
    # Output: Creating uptime-kuma ... done  
  1. Confirm the container is running:
bash
    docker ps  
    # Output: uptime-kuma | Running | Exposed Port 3001  

Initial Configuration for Uptime Kuma

After deployment, access the web interface to set up the monitoring system.

steps

  1. Open a browser and go to http://<Docker-host-IP>:3001.
  2. Create the admin account by setting a username and password.
  3. Begin adding monitors by grouping services logically based on criteria such as host type or service function.
  4. Save the configuration for efficient management.

Monitoring Services and Devices

Uptime Kuma supports various monitoring options, including Docker containers, web services, and more.

steps

  1. Add a new monitor by selecting the type, such as:

    • Docker container: Monitor specific containers on a host.
    • HTTP(S): Check web service status.
    • Ping: Test network devices like IP cameras.
  2. Adjust the heartbeat interval:

    • Default: 60 seconds.
    • Use a lower interval (e.g., 20 seconds) for critical services.
  3. Set retries to reduce false alarms for intermittent downtime. For instance, set retries to 3 for sporadically unstable services.

  4. Group monitors logically (e.g., all Docker containers under one group, or services grouped by functionality).

Setting Up Notifications for Service Alerts

Notifications ensure you receive outage alerts promptly. Configure as follows:

steps

  1. Navigate to Notifications in the settings menu.

  2. Select a notification method (e.g., Home Assistant, email, SMS).

  3. Enter the necessary credentials and test the configuration.

  4. Enable default notifications for all monitors or set per-service preferences.

    Example: Configure Home Assistant JSON-based notifications for granular control.

Verifying and Managing Uptime Kuma Monitoring

Test your setup to ensure everything works correctly.

steps

  1. Stop a monitored service or Docker container to simulate downtime.
  2. Observe if the monitor correctly reflects the downed service in the dashboard.
  3. Ensure notification retries and alert thresholds are functioning as configured.
  4. Update or fine-tune monitors and notifications based on real-time conditions.

FAQ

How do I monitor Docker containers in Uptime Kuma?

To monitor Docker containers, add a Docker monitor in the Uptime Kuma dashboard. Ensure the container's name matches precisely and test connectivity. Group containers logically for easier management.

Should Uptime Kuma be on the same system as monitored services?

No. Hosting Uptime Kuma on the same system creates a single point of failure. Use a separate machine or virtual infrastructure.

Can I monitor services behind self-signed SSL?

Yes. When setting up an HTTPS monitor, you can choose to ignore SSL certificate errors to accommodate self-signed certificates.


Official reference: Uptime Kuma.