Spam me - Update #2

Published

Previously I wrote about the spam me page and later an update on how things were going.

Things were stable and I didn't get any spam. But something bothered me. I would only get notifications on my laptop and only when it was on. Notifications would be lost if the laptop was offline. Also, Patchbay had downtime a few months back and I didn't get notifications at all. Lastly, I'm keen on self-hosting.

Nextcloud Notifier

Nextcloud has a notification mechanism that is used internally. I get notifications on pending updates on my cellphone and laptop. Pushing notifications over HTTP requires authentication, but using the occ CLI doesn't require authentication.

I wrote a simple web service to post messages through the Nextcloud notification mechanism. The service runs the occ command using docker exec so usage is anonymous. Notifications are received on both cellphone and laptop and I'm content. Now you can send me messages and I'll always get it.

Future uses

Now that I have a notification service, I saw more uses than I originally envisioned. I send notification on failed Cron jobs, for example:

backup || wget --spider https://notify.shore.co.il/send?message=Backup%20failed.

I have CI jobs that run on a schedule (rebuilding container images) so now I have a GitLab CI template that sends me a message if the CI pipeline failed.