4.2 KiB
Uptime Kuma Service Documentation
Overview
Uptime Kuma is a modern, open-source monitoring tool that provides real-time uptime tracking for servers, websites, and services. Its user-friendly interface, detailed reporting, and customizable notifications make it an excellent alternative to hosted solutions like Uptime Robot. Hosting Uptime Kuma in your home lab offers full control and privacy, tailored to your monitoring needs.
Docker Compose Setup
Deploying Uptime Kuma with Docker ensures a quick, efficient, and isolated setup. Below is the docker-compose.yml file configuration:
services:
uptime-kuma:
image: louislam/uptime-kuma:latest
container_name: uptime-kuma
restart: always
ports:
- "3001:3001" # Adjust the host port if necessary
volumes:
- /home/josh/uptime-kuma/data:/app/data # Persistent data storage
environment:
TZ: "America/Las_Vegas" # Set your local timezone
Configuration Details
-
Image:
- The
louislam/uptime-kuma:latestimage ensures deployment of the latest version of Uptime Kuma, complete with updates and security patches.
- The
-
Container Name:
- Naming the container
uptime-kumasimplifies management and debugging.
- Naming the container
-
Restart Policy:
- The
restart: alwaysdirective automatically restarts the service after failures or system reboots, ensuring reliability.
- The
-
Ports:
- Maps port
3001on the host machine to the same port in the container, making the service accessible athttp://<your-server-ip>:3001.
- Maps port
-
Volumes:
- Data is persistently stored in
/home/josh/uptime-kuma/dataon the host, ensuring monitoring history and configurations are preserved.
- Data is persistently stored in
-
Environment Variables:
- Configures the service to use the
"America/Las_Vegas"timezone, aligning notifications and logs with local time.
- Configures the service to use the
Deployment Steps
-
Prepare the Host Environment:
-
Create the directory for persistent storage:
mkdir -p /home/josh/uptime-kuma/data
-
-
Deploy Uptime Kuma:
-
Run the following command to start the service:
docker-compose up -d
-
-
Access the Uptime Kuma Dashboard:
-
Open a web browser and navigate to:
http://<your-server-ip>:3001
-
-
Configure Monitors:
- Log in to the dashboard and add monitors for servers, websites, or other services you wish to track.
Benefits of This Setup
-
Ease of Deployment:
- Docker Compose simplifies the process, making setup quick and maintenance straightforward.
-
Persistent Data:
- All configurations, logs, and monitoring data are preserved across updates or container restarts.
-
Scalability:
- Easily add more monitors or expand the system as your needs grow.
-
Custom Notifications:
- Configure notifications via email, Telegram, Slack, or other integrations to stay informed.
Troubleshooting
-
Service Not Accessible:
-
Ensure the container is running:
docker ps -
Check logs for errors:
docker logs uptime-kuma
-
-
Port Conflicts:
-
If port
3001is already in use, modify theportsconfiguration:ports: - "custom-port:3001" -
Restart the service:
docker-compose up -d
-
Additional Resources
Conclusion
This Docker Compose setup provides a robust and reliable foundation for monitoring your home lab's uptime and status. With its real-time insights, customizable alerts, and modern design, Uptime Kuma ensures your systems remain operational and your services run smoothly. 🚀