Are you dedicated to maintaining the reliability and performance of your `self-hosted` applications and services? Discover Uptime Kuma, the open-source solution designed to bring peace of mind to every `home server` enthusiast. This lightweight yet powerful `server monitoring` tool provides a beautiful, intuitive dashboard to keep a watchful eye on your websites, Docker containers, and vital services. Dive in to learn how Uptime Kuma can transform your monitoring strategy, ensuring you’re always aware and in control of your digital infrastructure.
Why Uptime Kuma is Essential for Your Self-Hosted Infrastructure
Uptime Kuma is an open-source monitoring tool specifically crafted for tracking the availability of servers, services, or websites. With its modern, clean interface, it’s perfectly suited for `homelabs`, Raspberry Pi setups, or dedicated servers. It monitors via HTTP, Ping, or other protocols and instantly notifies you of any outages. Uptime Kuma is lightweight, flexible, and incredibly easy to install using a Portainer Stack or Docker Compose, making it an indispensable asset for ensuring maximum `server uptime`.
Effortless Deployment: Installing Uptime Kuma
Streamlined Setup with Portainer Stacks
To begin, log into your Portainer instance and navigate to “Stacks.”
If you haven’t set up Docker and Portainer yet, our blog post Docker on Raspberry Pi – Basics explains how to get started.
Click on “Add Stack,” give it a name like uptimekuma, and paste the following YAML code:
services:
uptime-kuma:
container_name: uptime-kuma
image: louislam/uptime-kuma:2
restart: unless-stopped
ports:
- "3001:3001"
volumes:
- /data/uptime-kuma:/app/data
- /var/run/docker.sock:/var/run/docker.sock
Security Note: By binding /var/run/docker.sock, Uptime Kuma gains extensive access to your Docker host. This bind mount is only required for monitoring other Docker containers. If you do not wish to monitor Docker containers, you can remove this line. Always ensure your Uptime Kuma instance is not exposed to the internet without proper security measures, especially when operating a `home server`.
Adjust the port and the path to persistent data (only the left side before the colon in each line) as needed. The data folder should ideally reside on a local filesystem for optimal performance.
Click “Deploy the stack.” If there are no configuration errors, Portainer will automatically start the container.
Deploying with Docker Compose for Advanced Control
Alternatively, you can install Uptime Kuma directly using Docker Compose. This method assumes Docker and Docker Compose are already installed on your system.
Create a dedicated directory, navigate into it, and create a docker-compose.yml file:
mkdir uptime-kuma
cd uptime-kuma
nano docker-compose.yml
Copy the following content into the file:
services:
uptime-kuma:
image: louislam/uptime-kuma:2
container_name: uptime-kuma
ports:
- "3001:3001"
volumes:
- ./uptime-kuma-data:/app/data
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
Save the file and execute the following command to start Uptime Kuma in the background:
docker compose up -d
You can verify if the container is running with docker ps and check its output with docker logs uptime-kuma.
Getting Started: Your First Uptime Kuma Monitors
Once started, Uptime Kuma is accessible via http://<your-server-ip>:3001. Replace <your-server-ip> with the actual IP address of your server.
Upon your first login, you’ll create an admin account. Afterward, you can begin adding monitors, for example, for a website (HTTP).
Monitoring Websites and Services (HTTP/S)
As an example, let’s monitor the availability of a Nextcloud instance.
Click on “Add New Monitor” at the top.
Abbildung 1: Adding a new HTTP(s) monitor in Uptime Kuma.
Under “Monitor Type,” you’ll see the various types of services that can be monitored.
Select “HTTP(s),” assign a display name, enter the URL to be monitored, and adjust the remaining settings if necessary. We’ll leave them at their defaults.
That’s it! Kuma will now check every 60 seconds if the specified website responds with an HTTP status code between 200 and 299. This range is set as successful by default and can be customized if needed.
Self-Hosting Tip: Beyond your own services, consider using Uptime Kuma to monitor critical external APIs or third-party cloud services that your self-hosted applications rely on. This provides a holistic view of your entire service chain’s health.
Advanced Docker Container Monitoring
Thanks to the binding of /var/run/docker.sock, we can also directly monitor Docker containers, giving you complete visibility into your `containerization` efforts.
To do this, add a new monitor and select “Docker Container” as the “Monitor Type.”
First, we need to set up our Docker host. Click the plus icon next to the “Docker Host” field.
Abbildung 2: Setting up the local Docker host via the Docker socket.
For “Display Name,” enter a name like “Docker.” Choose “Socket” as the Connection Type and specify the path /var/run/docker.sock under “Docker Daemon.”
Then, you can test the connection via “Test” and save it.
Now we can configure our actual Docker monitor.
Abbildung 3: Configuring a Docker container monitor for Plex.
Assign a display name, enter the name of the desired container under “Container Label / ID,” and select our previously configured Docker host.
In our case, we want to monitor the Plex container. So, we’ll enter plex as the Container Label. The name must exactly match the actual container’s designation.
Finally, save the monitor. Uptime Kuma will now regularly check if the selected Docker container is running.
Stay Informed: Configuring Uptime Kuma Notifications
To avoid manually checking for outages, we can set up notifications. This is crucial for maintaining excellent `server uptime`.
Go to “Settings,” then “Notifications,” and add a new notification service. Uptime Kuma supports various services, including Email, Telegram, and Discord.
Select your desired service, enter the necessary credentials, and use the test function to verify that the notification works.
Afterward, enable the notification for your specific monitors. This way, you’ll be automatically informed if any of your monitored services go offline.
Your Comprehensive Server Monitoring Dashboard
Abbildung 4: The Uptime Kuma dashboard displays the status, availability, and response times of monitored services.
In no time, we’ve set up two services that are regularly monitored. The dashboard provides immediate insight into whether your services are reachable. Additionally, Uptime Kuma displays availability over the last 24 hours and 30 days, as well as response times. For HTTPS monitors, you can also keep an eye on SSL certificate expiration, preventing unexpected downtime.
Enjoy setting up and monitoring your `self-hosted` environment!
Matching hardware for your monitoring server
FAQ
Question 1: How lightweight is Uptime Kuma, and what are its minimum hardware requirements?
Answer 1: Uptime Kuma is incredibly lightweight, making it ideal for resource-constrained environments like a Raspberry Pi or small `home server`. It can run comfortably with as little as 128MB of RAM and a single-core CPU, though allocating more resources will improve its responsiveness, especially if you’re monitoring many services.
Question 2: What notification methods does Uptime Kuma support for immediate alerts?
Answer 2: Uptime Kuma offers extensive notification support, including popular options like Email, Telegram, Discord, Slack, Webhooks, Pushbullet, and many more. This flexibility ensures you can receive alerts through your preferred communication channels whenever a monitored service experiences an outage.
Question 3: Can Uptime Kuma monitor services located outside my local network, or only internal ones?
Answer 3: Yes, absolutely! Uptime Kuma can monitor any public-facing URL or service accessible from the internet. For internal services, you’d typically run Uptime Kuma within your local network. However, for advanced `self-hosting` scenarios, you could configure a secure VPN or expose your Uptime Kuma instance through a reverse proxy with strong authentication, allowing you to monitor both internal and external endpoints from a single, centralized dashboard. This is particularly useful for ensuring critical services like your personal WireGuard VPN endpoint are reachable from anywhere.

