Skip to content

Uptime-Kuma Deployment

Overview

This guide provides detailed instructions on deploying Uptime Kuma. Uptime Kuma is a self-hosted monitoring tool focusing primary on services uptime.

Docker Compose File Breakdown

version: '3.8'
# Simple docker-compose.yml
# You can change your port or volume location

services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    container_name: uptime-kuma
    networks:
      - ovencrypt
    volumes:
      - ./data:/app/data
    # ports:
    #   - "3001:3001" # <Host Port>:<Container Port>
    restart: always
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.uptime-kuma.rule=Host(`status.domain.com`)"
        - "traefik.http.services.uptime-kuma.loadbalancer.server.port=3001"
        - "traefik.docker.network=ovencrypt"

volumes:
  uptime-kuma-data:

networks:
  ovencrypt:
    external: true
    attachable: true

Deployment Instructions

  1. Prerequisites

    • Ensure Docker and Docker Compose are installed.
    • Initialize Docker Swarm: sh docker swarm init
    • Ensure the ovencrypt network is created and attachable: sh docker network create --driver=overlay --attachable ovencrypt
  2. Setup Environment Variables

    • Ensure the domain names in the Traefik labels match your actual domain names.
  3. DNS Configuration

    • Ensure the domain (status.domain.com) has an A record pointing to the IP address of the server where the services will be deployed. Configure Domains.
  4. Deploy the Stack

    • Navigate to the directory containing the docker-compose.yml file.
    • Run the following command to deploy the stack: sh docker stack deploy -c docker-compose.yml uptime_kuma_stack
  5. Verify Deployment

    • Check the status of the services using: sh docker stack services uptime_kuma_stack
    • Verify that the uptime-kuma service is running and properly configured.
  6. Access Uptime Kuma

    • Uptime Kuma should be accessible at http://status.domain.com.
  7. Logs and Debugging

    • To view logs for the Uptime Kuma service, use: sh docker service logs uptime_kuma_stack_uptime-kuma
    • Replace uptime_kuma_stack_uptime-kuma with the actual service name if different.