Run Uptime Kuma as a Docker Container on a Raspberry Pi
2 minute read
Goal
Create a Docker Compose file
Run Pi Hole as a Docker Container on a Raspberry Pi
Install Docker and Docker Compose
Your Raspberry Pi should have a static IP and be up to date. You can follow this guide to install Docker and Docker Compose.
Persistent storage for configuration files
Create a new directory to save the Docker Compose file for the container.
sudo mkdir /home/uptime-kuma
Docker Compose file
Now you create the Docker compose file that configures the docker container. Create this in the root of your working directory and edit it with your favorite text editor.
sudo cd /home/uptime-kuma
sudo vi 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 Uptime Kuma
When the Uptime Kuma is running, open the webpage using the address below.
http://<raspbian-server-ip>:3001
References
How to Monitor Docker Containers
Feedback
Was this page helpful?
Glad to hear it!
Sorry to hear that.