Run Uptime Kuma as a Docker Container on a Raspberry Pi
Categories:
less than a minute
Goal
This sets up Uptime Kuma as a Docker container
It uses Docker Compose
The host OS is Raspbian running on Raspberry Pi hardware
Uptime Kuma is a server used to monitor servers and services.
Run Uptime Kuma as a Docker container
Create a new directory to save the Docker Compose file for the container.
mkdir /docker/uptime-kuma
Change directory into the new directory and create a Docker Compose file.
cd /docker/uptime-kuma
nano docker-compose.yml
Paste the Docker Compose configuration into the file. This Docker Compose file references the Docker container detailed in the referenced Docker Hub link below.
# Uptime Kuma
# https://hub.docker.com/r/louislam/uptime-kuma
#
# Notes:
# - Web server is found at http://<dockerhost-ip>:3001
version: "3"
services:
uptime-kuma:
container_name: uptime-kuma
image: louislam/uptime-kuma:latest
ports:
- 3001:3001
volumes:
- /opt/uptime-kuma:/app/data
- /var/run/docker.sock:/var/run/docker.sock
restart: always
Docker container monitoring
Docker container monitoring** can be setup if you can the /var/run/docker.sock:/var/run/docker.sock
to the volume section of the compose file. This allows Uptime Kuma to query the local Docker container status.
Start the Docker container
Run the Docker Compose command to start the container and include the -d
so it runs it as detached from the CLI.
sudo docker-compose up -d
Connect to the web interface
http://<dockerhost-ip>:3001
References
https://hub.docker.com/r/louislam/uptime-kuma
https://github.com/louislam/uptime-kuma/wiki/How-to-Monitor-Docker-Containers?ref=selfh.st