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
-
Prerequisites
- Ensure Docker and Docker Compose are installed.
- Initialize Docker Swarm:
sh docker swarm init - Ensure the
ovencryptnetwork is created and attachable:sh docker network create --driver=overlay --attachable ovencrypt
-
Setup Environment Variables
- Ensure the domain names in the Traefik labels match your actual domain names.
-
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.
- Ensure the domain (
-
Deploy the Stack
- Navigate to the directory containing the
docker-compose.ymlfile. - Run the following command to deploy the stack:
sh docker stack deploy -c docker-compose.yml uptime_kuma_stack
- Navigate to the directory containing the
-
Verify Deployment
- Check the status of the services using:
sh docker stack services uptime_kuma_stack - Verify that the
uptime-kumaservice is running and properly configured.
- Check the status of the services using:
-
Access Uptime Kuma
- Uptime Kuma should be accessible at
http://status.domain.com.
- Uptime Kuma should be accessible at
-
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-kumawith the actual service name if different.
- To view logs for the Uptime Kuma service, use: