Uptime-Kuma deployment

Share


Hello there,

This will be a rather short one today, since the setup is very straightforward. But, this way I won't forget the name again, and maybe it helps someone.

So let's begin.


Uptime-Kuma deployment

For this, I will be using an already existing VM with Rocky Linux 8.7. If you want to see how to install docker on Rocky Linux, you can check this post.


Docker container deployment

There is a one-liner on the uptime-kuma github page for a docker deployment. But I want to use Ansible to deploy the container, to make it easily reproducible.

Here is the CLI way of deploying it and how to open port 3001/TCP on the host.

uptime-kuma :: ~ » sudo docker run -d --restart=always -p 3001:3001 -v /home/uptime-kuma/uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1uptime-kuma :: ~ » sudo firwall-cmd --add-port 3001/tcp --permanentuptime-kuma :: ~ » sudo firwall-cmd --add-port 3001/tcp

Here is the playbook. I usually use roles, but this should also work.

This will create a folder named "uptime-kuma" under /home/uptime-kuma/ and map it to the /app/data folder within the uptime-kuma container, map the host port 3001 to the docker container and pull the uptime-kuma container.

Below that is a state that opens port 3001 on the host.

[bg_collapse view="link" expand_text="Show More" collapse_text="Show Less"]

Read more