Skip to main content
  1. Posts/

Uptime Kuma

Table of Contents

My Uptime Kuma Setup
#

This Uptime Kuma setup runs in a Docker container and is used to monitor websites, services, and network devices. It includes configurations for environment variables, volume mounts, and networking.


Prerequisites
#


Create a Persistent Data Folder
#

Create a local folder to store Uptime Kuma data:

mkdir -p ~/uptime-kuma

Docker Compose Deployment
#

Create a file named docker-compose.yml:

services:
  uptime-kuma:
    image: louislam/uptime-kuma:2 # Uptime Kuma image
    container_name: uptime-kuma # Container name
    restart: always # Always restart on failure or reboot
    ports:
      - "3001:3001"  # This maps the container port "3001" to the host port "3001"
    volumes:
      - ~/uptime-kuma/config:/app/data  # Configuring persistent storage
    environment:
      - TZ=Europe/London  # Set the timezone (change to your preferred local timezone so monitoring times are the same)
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3001"] # Check local web health endpoint
      interval: 30s # Health check interval
      retries: 3 # Number of retries before unhealthy
      start_period: 10s # Startup grace period
      timeout: 5s # Health check timeout
    logging:
      driver: "json-file" # Docker default log driver
      options:
        max-size: "10m" # Rotate logs after 10MB per file
        max-file: "3" # Keep up to 3 rotated log files

Start it:

docker compose up -d

Access the Web UI
#

Open:

http://<your-server-ip>:3001

On first launch, create your admin account and password.


Updating Uptime Kuma
#

If you deployed with Docker Compose:

docker compose pull
docker compose up -d

Your monitor history and settings remain intact because data is stored in ~/uptime-kuma/config.


Useful Commands
#

View logs:

docker logs -f uptime-kuma

Check container status:

docker ps --filter name=uptime-kuma

Conclusion
#

Uptime Kuma gives you a simple way to monitor services and publish a status page from your own server. With persistent storage and regular backups, it is easy to run and maintain on Ubuntu.

For more details, visit the official documentation:

Uptime Kuma Documentation