ntfy is an open-source notification system for the command-line interface. It sends notifications about various system events like command completion, file downloads, system failures, etc. In this tutorial, we will explain how to install ntfy on the latest version of Ubuntu Server.
Before installing ntfy, you must have the following:
ntfy is written in Python and needs some Python packages to function correctly. Therefore, we need to install Python and other required packages.
Open the terminal by pressing Ctrl+Alt+T
.
Update the system by running the following command.
$ sudo apt update && sudo apt upgrade -y
pip
by executing the following command.$ sudo apt install python3 python3-pip -y
$ sudo pip3 install notify2 psutil requests
After installing required Python packages, we can now download and install ntfy.
$ sudo curl -L https://github.com/dschep/ntfy/releases/download/v2.1.0/ntfy-2.1.0.tar.gz -o ntfy.tar.gz
You can visit the ntfy releases page to download the latest version.
$ sudo tar xzf ntfy.tar.gz
$ cd ntfy-2.1.0
$ sudo python3 setup.py install
Now you have successfully installed ntfy on your Ubuntu Server.
To use ntfy, we just need to run a command and it will take care of the rest. For example, to get notifications about completion of long-running commands, we can use the following command.
$ ntfy long-running-command
ntfy will send you a system notification when the command completes.
There are many other use cases for ntfy. You can visit the ntfy GitHub page to learn more.
ntfy is a powerful command-line notification system that can help notify you about important system events. In this tutorial, we learned how to install ntfy on Ubuntu Server latest version. We also explained how to use it to get notifications about commands completion.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!