Blog personal de Anibal Copitan usuario Linux, creador de software y contenido sobre IA & Programación
¿Listo para aprender más? Contáctame por WhatsApp
sábado, 15 de marzo de 2025
How to Create a Broadcast Notification Server
This guide explains how to set up a notification server using ntfy.sh
to send notifications
across web and mobile devices (Android/iOS). It will be
broadcast to all synced devices under the mytopic
section.

Installing ntfy.sh
To install ntfy.sh
on a Raspberry Pi running
Debian/Ubuntu, follow these steps:
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://archive.heckel.io/apt/pubkey.txt | sudo gpg --dearmor -o /etc/apt/keyrings/archive.heckel.io.gpg
sudo apt install apt-transport-https
sudo sh -c "echo 'deb [arch=armhf signed-by=/etc/apt/keyrings/archive.heckel.io.gpg] https://archive.heckel.io/apt debian main' > /etc/apt/sources.list.d/archive.heckel.io.list"
sudo apt update
sudo apt install ntfy
sudo systemctl enable ntfy
sudo systemctl start ntfy
The last two lines ensure that ntfy
automatically
restarts if the Raspberry Pi reboots.
Configuring the Server
Since port 80
is already in use, change the
ntfy.sh
server to listen on port 83
:
Modify the configuration:
listen-http: ":83"
Restart the server for the changes to take effect:

Exposing Port 83
If the server is hosted at home, expose port 83
on your
router for public access. If needed, configure port forwarding for
80
in your router settings.
Testing Notifications
Send test notifications from the local server and the internet:




Security Considerations
For secure access and notification generation, enable
auth-file
in the configuration.
🎥 Watch the Demo in Action!
Here’s a quick demo showing how ntfy.sh sends a notification when a user subscribes with their email. The video is in Spanish, but you can follow the process visually.
Conclusion
Setting up a broadcast notification system with ntfy.sh
is straightforward and efficient. It enables fast integration via HTTP,
making it a powerful tool for real-time notifications across multiple
devices.
Soy Aníbal 🐧💻. ¿Tienes una gran Idea/Proyecto?
¿Tienes un proyecto en mente o necesitas resolver un desafío técnico? Estoy aquí para ayudarte a encontrar la mejor solución. 🚀
Hablemos sobre tu proyecto
No hay comentarios:
Publicar un comentario