<!--
  canonical-url: https://www.avonture.be/blog/docker_uptime_kuma
  published:     2023-12-05
  This is a static plain-Markdown mirror generated at build time.
  Visit the canonical URL above for the fully rendered page, with images and interactive components.
-->

# Self-hosted monitoring tool

> Learn how to easily set up Uptime Kuma, a free, self-hosted website monitoring tool, using a simple Docker command. Keep track of your sites' uptime, ensure data persistence, and configure notifications.

---
![Self-hosted monitoring tool](/img/v2/docker_playing_with_app.webp)

**TL;DR**

This article shows how to self-host Uptime Kuma, a free website-monitoring dashboard, with a single `docker run` command (mounting a volume to persist monitored sites across restarts), then configure per-site checks and notifications (e.g. via Mattermost or email) when a site goes down.

Imagine you're a web developer or you work in a web agency and you'd like to keep an eye on the sites you've developed for your clients, free of charge.  Are these sites online now, or are they down?

This work is carried out by site monitoring platforms. Could you install one on your computer? Of course!

There are tons of *self-hosted monitoring tools*; one of them is [Uptime Kuma](https://github.com/louislam/uptime-kuma). You can play with the demo website here: <https://demo.kuma.pet/>. Just create an admin account (for free) and you're ready to add your first websites.

As read in the [official documentation](https://github.com/louislam/uptime-kuma#-docker), you can easily start it using the command below.

```bash
$ `docker run -d --restart=always -p 3001:3001 -v \${PWD}:/app/data --name uptime-kuma louislam/uptime-kuma:1`
```

> Screenshot — http\://localhost:3001
>
> ![Dashboard](./images/dashboard.webp)

> **Remember to add a volume:**
>
> The `-v ${PWD}:/app/data` flag (a [volume](/blog/docker-volume)) is important if you want to keep track of the sites you'll add to the dashboard (i.e. if you restart the tool). If you wish, only, play once with the interface first, you can omit it so nothing will be written on the disk.

In the setting page, site by site, you can define a lot of actions like what the monitoring tool should do when the site is down. For instance, send you a notification on *Mattermost* or an email or ...

![Notification through Mattermost](./images/notification.webp)

> **There are so many settings to configure:**
>
> On top of configuration items site by site, you'll also find in the *Profile -> Settings* page, a large number of global settings like the choice of the language's interface (French is available).

Uptime Kuma watches your sites **from the outside**. For what happens on your own machine, [Get health information from your running containers](/blog/docker-healthy) does the same job for your containers. And once you self-host a few such tools, [Heimdall](/blog/heimdall-dashboard) is a nice way to gather them on a single homepage.
