Tutorials

Home Server Monitoring with Kuma Uptime — A Simple Way to Monitor Service Availability

Home Server Monitoring with Kuma Uptime — A Simple Way to Monitor Service Availability

Have you ever suddenly realized that the website you run on your home server has been down since last night, but you only found out now? Or maybe an application running using Docker suddenly crashes, and you don't even know when it started to crash? If yes, you are not alone. Many who run servers at home forget that service availability must be monitored — not just for those in the cloud.

This is where Uptime Kuma comes in as a simple, self-hosted, and free monitoring solution. This article will discuss how to setup Kuma Uptime on a home server from scratch, including Docker configuration, notifications, and some useful tricks.

What is Kuma Uptime?

Uptime Kuma is an open-source monitoring application designed to monitor service availability — from websites, TCP ports, DNS, to applications running on Docker. Think of it like a house alarm: you install sensors at several points, and if something goes wrong, the alarm goes off. Uptime Kuma does the same thing, but for your digital services.

What's interesting is that Uptime Kuma is designed to be self-hosted, meaning that all monitoring data remains on your server. No need to worry about privacy or dependence on third-party services. The look is also clean and modern — it doesn't take long to get used to.

Why does Home Server Need Monitoring?

Many people think that monitoring is only for large servers or enterprise services. In fact, a home server is also needed. Here are some reasons why you need:

  • Detect problems faster — Instead of only finding out there is a problem when someone complains or checks manually, monitoring notifies you automatically.
  • Uptime history — You can see patterns: does the server crash frequently at certain times? Are there recurring network problems?
  • Documentation for yourself — Monitoring history can be proof that your server is stable, or can be used as evaluation material when there is a problem.
  • Real-time notifications — If someone dies, you will immediately know via email, Telegram, or even push notification on your cellphone.

In essence, monitoring is like insurance: you hope you don't need to use it, but if you do, you're grateful you installed it.

Step 1: Docker Preparation

Kuma uptime can be run directly or via Docker. Since most home servers now use Docker, we will use that method because it is cleaner and easier to manage.

Make sure Docker and Docker Compose are installed on your server. If not, run:

sudo apt update && sudo apt install -y docker.io docker-compose-plugin
sudo systemctl enable --now docker

After that, create a directory for Uptime Kuma:

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

Step 2: Create Docker Compose

Create a docker-compose.yml file with the following contents:

version: "3.8"
services:
  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    restart: unless-stopped
    ports:
      - "3001:3001"
    volumes:
      - ./data:/app/data

Brief explanation:

  • Image: Uses the official image from Docker Hub (louislam/uptime-kuma).
  • Ports: Map port 3001 from container to host. You can change the first number (eg 8080:3001) if port 3001 is already in use.
  • Volumes: Data is stored in the ./data directory to be persistent. If the container is deleted, the data remains safe.
  • Restart: unless-stopped means the container automatically restarts when the server reboots, unless you manually stop it.

Run:

docker compose up -d

Wait a few moments until the image is downloaded. Once done, open a browser and access http://IP_SERVER:3001. You will be asked to create the first admin account.

Step 3: First Monitor Setup

After logging in, you will see an empty dashboard. Click "+ Add New Monitor" to start monitoring the service.

The following types of monitors are available:

  • HTTP(s) — Monitors whether the URL is accessible and responds with status code 200. Suitable for websites or APIs.
  • TCP Port — Monitors whether a specific port is accessible. Useful for services that don't have an HTTP interface.
  • DNS — Ensures DNS resolution is correct.
  • Docker — Monitor Docker containers in real time.
  • Keyword — Checks whether the page contains a specific keyword.

As an example, we will monitor a website running on Nginx. Fill in the form like this:

  • Monitor Type: HTTP(s)
  • URL: https://adammuiz.com
  • Monitoring Interval: 60 seconds (default is enough for most cases)
  • Retries: 3 (meaning the server must fail 3 times in a row before being declared down)

Click Save, and the monitor will start working immediately. You will see graphs of uptime and response time on the dashboard.

Step 4: Automatic Notifications

Monitoring without notifications is like an alarm that sounds but you don't hear it. Kuma Uptime supports many notification methods, including:

  • Email (SMTP) — Send email when the service is down or restored.
  • Telegram Bot — Notifications directly to Telegram. Very practical for Indonesian users.
  • Discord Webhook — Suitable if you use Discord for a community.
  • Pushover / Pushbullet — Push notification to cellphone.
  • Shell Command — Run a custom script when an event occurs.

Let's setup notifications via Telegram. You need to create a Telegram bot first:

  1. Open Telegram, search for @BotFather, and send the command /newbot.
  2. Provide a name and username for your bot. BotFather will provide a token.
  3. Find your new bot in Telegram, send any message (e.g. "Hello"), then open this URL in a browser: https://api.telegram.org/botTOKEN/getUpdates to get a chat ID.

Now, on Kuma Uptime:

  1. Go to Settings → Notifications.
  2. Click Setup Notification.
  3. Select Telegram.
  4. Fill in the Bot Token and Chat ID.
  5. Test the notification, then save.

After that, every time the service you are monitoring goes down, you will immediately receive a message on Telegram. Practical, right?

Step 5: Public Page Status

Another cool feature of Uptime Kuma is the Status Page. This is a public page that shows the status of all your services — similar to the status pages used by large companies like GitHub or Cloudflare.

To activate it:

  1. Open Status Pages in the dashboard.
  2. Click "Create Incident" or "New Status Page".
  3. Select which monitor you want to display.
  4. Set a custom name and URL if necessary.

This status page can be accessed by anyone who has the link. Useful if you want to show your server uptime to friends, family or clients.

Step 6: Data Backup

Because all Kuma Uptime data is stored in the data directory, backup is very easy. You can use crontab for automatic backup:

0 2 * * * tar -czf /home/adam/backup/uptime-kuma-$(date +\%Y\%m\%d).tar.gz -C /opt/uptime-kuma data

Or if you want to be more sophisticated, use restic or borgbackup for encrypted backup to remote storage.

Important to remember: the backup must include the entire data directory, as it contains the SQLite database containing all monitor configuration, history, and notification settings.

Additional Tips

Some tips that I learned after using Uptime Kuma for a long time:

  • Don't be too aggressive — A 10 second monitoring interval may sound good, but it will overload the server and generate too much data. For most cases, 60 seconds is enough.
  • Use retries — Don't notify immediately when one fails. Set a minimum of 2-3 retries to avoid false alarms due to network transients.
  • Monitor from within too — You can monitor services from the local IP to ensure LAN access is also running, not just from the public URL.
  • Combine with nftables — If you already use nftables, make sure the monitoring port is not blocked by a firewall.

Conclusion

Kuma Uptime is one of the best self-hosted monitoring tools I have ever used. It's simple to setup, light to run, and has enough features for home server needs. Most importantly, all data remains yours — no dependency on third-party services.

If you already have a home server running but don't have monitoring yet, this is the right time to start. Because an unmonitored server is like a house without an alarm — you hope it's safe, but who knows?

Have you used Kuma Uptime or other monitoring tools? Tell us your experience in the comments column. If there are any conflicts regarding setup, don't hesitate to ask!