How to install ntfy on Debian Latest

Introduction

ntfy is a Python command-line tool that sends desktop notifications on command completion or failure. It supports various notification backends and is easy to configure. In this tutorial, we will show you how to install ntfy on Debian Latest.

Prerequisites

Before you begin, you need the following:

Step 1: Update package repositories

The first step is to update your package repositories by running the following command:

sudo apt update

Step 2: Install dependencies

ntfy requires several dependencies that you need to install before you proceed. Run the following command to install the dependencies:

sudo apt install python3-pip libnotify-bin

Step 3: Install ntfy

After installing the dependencies, you can now install ntfy using pip3:

sudo pip3 install ntfy

Step 4: Test ntfy

To test ntfy, run any command followed by ntfy. For example:

ls /home/user/Documents | ntfy

This will list the contents of your Documents folder and send a notification when it's done.

Configure ntfy

To configure ntfy, create the configuration file ~/.config/ntfy/ntfy.yml with your preferred settings. Here is an example configuration file:

backends:
  - pushbullet
  - pushover
  - notify-send
  - slack
  - telegram

This configuration uses five different notification backends. You can add or remove backends as you wish.

Conclusion

In this tutorial, you learned how to install and configure ntfy on Debian Latest. With ntfy, you can receive desktop notifications when tasks are completed or fail, making it easier to manage long-running commands.

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!