Robin Gierse
Inline Skater

Today I learned

Self-hosted ntfy.sh

2 min read

Today I learned: How to set up self-hosted ntfy.sh using Docker and Apache2 as a reverse proxy.

What does ntfy.sh do?

ntfy.sh is a push notification service, that can be used both using a public server or self-hosted instance. There are mobile apps alongside a web app to use the service with. The public server offers basic functionality but also paid tiers, that unlock more functionality. But I did not really dive into those offerings, as I wanted to go self-hosted in the first place.

Why did I choose it?

Well, plainly, I heard about it quite some time ago already, but as I was using a Telegram bot for notifications, so I had no incentive to look into it. But now a use case arose, and I remembered the solution. So I looked into it a bit and realized that it is really easy to set up. Additionally, I liked the overall approach, the availability of mobile apps and that a Docker image was available, which enables a quick and easy setup.

My setup

So I went on and looked at the plethora of installation methods. And while I was impressed with the different options to install it - among others there are native .rpm and .deb packages - I chose the docker approach, as I had a Docker host available and wanted to be able to remove everything in a blink, if it did not work for me. So I added a mount for the configuration file and a user database, made some initial configurations and spun up the container. Additionally, I configured a domain, a virtual host on my reverse proxy and certificates to be able to talk to the container securely. And that was pretty much it. I tested the application manually real quick and then enabled a community notification plugin for Checkmk. Their README is excellent and gets the installation done in a breeze.

Wrapping up

I am happy with my setup, it was easy enough to set up, while offering a lot of options and tuning. So if you are looking for a self-hosted notification mechanism, give ntfy.sh a spin.