Files
ntfy-freebsd-server/README.md
2025-05-31 21:03:25 -05:00

53 lines
2.6 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

**From:** [](https://github.com/binwiederhier/ntfy)https://github.com/binwiederhier/ntfy
**![images/ntfy.png]**
# ntfy.sh | Send push notifications to your phone or desktop via PUT/POST
**ntfy** (pronounced "*notify*") is a simple HTTP-based <ins>pub-sub</ins> notification service. With ntfy, you can **send notifications to your phone or desktop via scripts** from any computer, **without having to sign up or pay any fees**. If you'd like to run your own instance of the service, you can easily do so since ntfy is open source.
You can access the free version of ntfy at **<ins>ntfy.sh</ins>**. There is also an <ins>open-source Android app</ins> available on <ins>Google Play</ins> or <ins>F-Droid</ins>, as well as an <ins>open source iOS app</ins> available on the <ins>App Store</ins>.
### **Why does this exist when there's already a FreeBSD sysutils/ntfy pkg/port?**
The FreeBSD ntfy client package doesn't have the server or web built-in. It's a basic client only. It's also on version 2.7.0 while the latest release is currently 2.11.0. This repo is to build a full install with client, server, and web running as a ntfy user with startup scripts and configs for client and server. 
I built ntfy server on FreeBSD manually and have been testing it. I decided if I was going to keep using it that I should formalize an install. 
### **Install FreeBSD prerequisites:**
`pkg install python311 py311-pip node20 npm-node20 go gmake`
### Build:
sudo sh ./install_ntfy_server.sh
### Configure:
Edit your server.yml in /usr/local/etc/ntfy/ to set your hostname, listening
IP/port, and any other desired settings.
The nfty server service runs as a unprivileged user and must use a port
higher than 1024. Use a webserver or reverse proxy in front of ntfy to
provide http/https access.
Copy index.html to your webserver docs directory (e.g.
https://ntfy.mydomain.com/docs/) to redirect to the online https://docs.ntfy.sh
when a user clicks on the documentation button. Alternatively, you can mirror
the online docs to your docs directory if you don't want to rely on theirs.
Use 'sysrc ntfy_enable="YES"' or add 'ntfy_enable="YES"' to your /etc/rc.conf
or /etc/rc.conf.d/ntfy manually to enable the service. Use 'service ntfy start'
to start the service.
**TODO**:
- Create uninstall script (or uninstall option in main script)
- Create dependency checks in install script and make more robust
- Create package (probably a tarball before a real FreeBSD pkg)
- Testing client and config. 
### License
The project is dual licensed under the \[Apache License 2.0\](LICENSE) and the \[GPLv2 License\](LICENSE.GPLv2).