How to Install Uptime Kuma on Ubuntu 24.04 Using Docker Compose

Estimated reading: 3 minutes 145 views

Introduction

Uptime Kuma is a lightweight, open-source monitoring tool that allows you to monitor websites, servers, network services, APIs, and other infrastructure.

In this guide, we will install Uptime Kuma on Ubuntu 24.04 using Docker Compose. This installation method keeps Uptime Kuma isolated in a Docker container and makes it easy to manage, update, and maintain.

This guide focuses only on the installation process. Additional monitoring and notification configuration can be completed after the installation.

Prerequisites

Before starting, make sure you have:

  • Ubuntu 24.04 LTS
  • Root or sudo access
  • At least 1 CPU core
  • At least 512 MB RAM
  • At least 5 GB of available storage

Step 1: Update the System

Connect to your Ubuntu 24.04 server via SSH and update the system packages:

apt update && apt upgrade -y

Install the required packages:

apt install curl ca-certificates -y

Step 2: Install Docker

Install Docker using the official installation script:

curl -fsSL https://get.docker.com | sh

Verify that Docker has been installed successfully:

docker --version

Enable Docker to start automatically after a server reboot:

systemctl enable docker
systemctl start docker

Check the Docker service:

systemctl status docker

If the service shows active (running), Docker is ready.

Step 3: Create the Uptime Kuma Directory

Create a dedicated directory for Uptime Kuma:

mkdir -p /opt/uptime-kuma
cd /opt/uptime-kuma

Create a directory for persistent Uptime Kuma data:

mkdir -p data

The data directory will store Uptime Kuma’s database and configuration files. Keeping this data outside the container ensures that it remains available when the container is recreated or updated.

Step 4: Create the Docker Compose File

Create the Docker Compose configuration file:

nano docker-compose.yml

Add the following configuration:

services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    container_name: uptime-kuma
    restart: always
    ports:
      - "3001:3001"
    volumes:
      - ./data:/app/data

Save the file and exit Nano.

Step 5: Start Uptime Kuma

Start the Uptime Kuma container:

docker compose up -d

Docker will automatically download the Uptime Kuma image and create the container.

Check the container status:

docker compose ps

You can also verify it with:

docker ps

The container should show a status similar to:

Up

Step 6: Access Uptime Kuma

Once the container is running, Uptime Kuma can be accessed through port 3001.

Open the following URL in your browser:

http://SERVER_IP:3001

Replace SERVER_IP with the public IP address of your Ubuntu server.

For example:

http://203.0.113.10:3001

If the Uptime Kuma setup page appears, the installation has been completed successfully.

Useful Commands

Check Uptime Kuma Status

cd /opt/uptime-kuma
docker compose ps

View Logs

docker logs -f uptime-kuma

Press Ctrl + C to exit the logs.

Restart Uptime Kuma

docker restart uptime-kuma

Stop Uptime Kuma

cd /opt/uptime-kuma
docker compose down

Start Uptime Kuma Again

cd /opt/uptime-kuma
docker compose up -d

Conclusion

Uptime Kuma is now installed and running on your Ubuntu 24.04 server using Docker Compose.

The application is available on:

http://SERVER_IP:3001

The installation uses a persistent data directory at /opt/uptime-kuma/data, so your Uptime Kuma data will remain available even if the Docker container is recreated.

You can now access the web interface and complete the initial Uptime Kuma configuration.

Share this Doc

How to Install Uptime Kuma on Ubuntu 24.04 Using Docker Compose

Or copy link

CONTENTS