Monitor your homelab infrastructure externally for free*

Let's use Uptimedoctor, Pushover, and Cloudflare Tunnels to monitor our internal Uptime Kuma instance.

Monitor your homelab infrastructure externally for free*
Photo by ThisisEngineering / Unsplash

proceed with caution - we're getting cheeky here, folks

If you haven't read my previous post on monitoring internal resources using Tailscale on an external VPS, I recommend you read it first. This post will be an iteration of that project.

Monitor Your Homelab from the Cloud: Uptime Kuma on a VPS using Linode + Tailscale + pfsense
I’ll show you how I configure a VPS to safely monitor my homelab.

My Uptime Kuma notifications coming from a Linode VPS have been working great and I don't need to change it up... but there's always room to simplify my homelab. Up until this project I had two Kuma instances (public and internal) and multiple VPS' with different providers. To clean that up, I'm getting rid of the Linode VPS entirely, although it's been awesome.

$free.99

To do this for free* you'll need to already have purchased Pushover... which I'm hoping you've done in the first version of the project.

Oh, also you will need a domain from Cloudflare.

... so it's not completely free, okay? I admit it, leave me alone.

Getting started

I hope you try to avoid opening any ports on your firewall if you don't need to. My rule has been I don't host public things on my home network. However, we'll be using Cloudflare Tunnels today, which technically will be allowing public traffic to an internally hosted service - but no ports will be opened. It's sort of magic, and they explain it better than me so check it out.

Fair warning, once I got this set up with my new domain on Cloudflare I got HAMMERED with spam calls about logo designs, website designs, etc. Just be aware.

I'll be using a few different platforms to make this work today.

First, the main component that allows this to work, like we said, is Cloudflare Tunnels. This will allow us to expose our internal Uptime Kuma instance publicly without opening any ports on our firewall. Check out the docs below.

Next, Uptimedoctor. The idea here is a service to monitor a public website and notify you if it's down. Uptimedoctor does that (for 5 websites) for free.

Log In to Your Account - Uptime Doctor
Log in to the monitoring control panel.

Last is Pushover, which I mentioned in the first iteration of this project. It's a service that lets you set up push notifications to many different devices in many different ways.

Pushover: Simple Notifications for Android, iPhone, iPad, and Desktop
Pushover makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop (Android Wear and Apple Watch, too!)

TL;DR

  1. Use a Cloudflare Tunnel to expose your Uptime Kuma instance on a public domain without opening any ports on your firewall.
  2. Use Uptimedoctor to notify you if that website goes down.
  3. Use Pushover to receive push notifications about the status of the Uptime Kuma wesbite.

Let's do it

So, with the assumption you're already running Uptime Kuma, let's get started. Make sure you have a domain in Cloudflare ready to use. I'm the kind of person who isn't going to rehash something if there's already good documentation for it. So using the docs below, set up a Cloudflare Tunnel for Uptime Kuma.

Reverse Proxy with Cloudflare Tunnel
A fancy self-hosted monitoring tool. Contribute to louislam/uptime-kuma development by creating an account on GitHub.

At this point you should be able to navigate to your Uptime Kuma instance from the public internet, which is cool. Next we need a way to be notified if that website goes down for some reason, which is where Uptimedoctor comes in.

Get an account with Uptimedoctor and set up your monitor to be pointed at the domain you got from Cloudflare.

You'll also need to login to Pushover and grab the email address they've set up for you to input into Uptimedoctor. Essentially any emails that come to that email address generate a Push notification on your device of choice, simple. When you log into Pushover you'll see a section titled "Your E-Mail Aliases", and that will be the email address you'll input to Uptimedoctor.

Once complete it should look something like this, where at minimum you'll be receiving an email to your Pushover email address if Uptimedoctor sees this site go down.

Test the magic

Now, it's probably worthwhile to test it out.

💡
Think logically about this test. Following along with me could mean you aren't able to access your Uptime Kuma instance temporarily, make sure you are understanding what you're actually doing.

Go on back to Uptime Kuma > Settings > Reverse Proxy you'll see a big red "stop cloudflared" button. Doing so will make your tunnel go down. After a few minutes there should be pretty substantial impact to what we just set up. In the Cloudflare Tunnel portal you should see your tunnel as "down" as well.

And finally, we should get a Push notification from Pushover.

Excellent! Now, back in Uptime Kuma click "Start cloudflared".

Once you receive the UP notification - you're good to go.

Hope this works well for you, enjoy.