Coder Social home page Coder Social logo

ntfy's Introduction

ntfy

Simplifying push notifications from your terminal, the ntfy tool is written by Kyser Clark to make it easier for everyone to send notifications with fewer keystrokes. ntfy was not created by Kyser Clark, but this tool makes ntfy easier to use, which is why it's called ntfy.

Installation

To install ntfy, run the following commands:

wget https://github.com/KyserClark/ntfy/archive/refs/heads/main.zip
unzip main.zip
cd ntfy-main
sudo bash install.sh

Make sure you download the ntfy mobile app and configure it accordingly.
Essentially, all you have to do is point the server URL to your host IP address/port and create a topic, and you're off to the races.

The IP should auto-resolve to your primary IP address that points to the internet. The port is 8686 by default. And the default topic is 'Topic'.

If you don't like these defaults, feel free to change them. I made it easy to change any of these values by doing --ip, --port, and --topic respectfully. The default message is 'Command Finished'. You can change it with --message. Set temporary message and temporary topic with -m and -t respectfully.

This tool is designed to self-host a docker container on your local area network (LAN).
If you run ntfy on a virtual machine (VM), ensure your VM is in bridge mode.
Otherwise, the ntfy server can't communicate with other devices on your network.

For more info, refer to NetworkChuck's video: https://www.youtube.com/watch?v=poDIT2ruQ9M&ab_channel=NetworkChuck
This is where I first learned about and how to use ntfy. My tool cuts down on keystrokes and makes it easier to set up and modify.

If you encounter any bugs or issues, please let me (Kyser Clark) know.
As of now, the install.sh file is for Debian-based systems. If you run a different version of Linux, you'll have to install dependencies manually.

This tool has been tested on the following versions of Linux:

  • Kali Linux 2023.3
  • Ubuntu 22.04.3 LTS (Jammy Jellyfish)
  • Parrot OS Security Edtion 5.2 (Electro Ara)
  • Linux Mint 21.2 "Victoria" (Cinnamon Edition)

Usage

Execute ntfy with options like so:

ntfy [options]

Examples:

Run a command and send a notification if successful:

[command] && ntfy

Send a custom message and use a different topic if a command fails:

[command] || ntfy -m 'Different Message' -t 'New_Topic'

Start tool with:

sudo ntfy --start

Change default settings with:

sudo ntfy --ip [IP-ADDRESS/INTERFACE] --port [PORT] --topic [CUSTOM-TOPIC] --message [CUSTOM-MESSAGE] 

Change temporary values with:

ntfy -t [TEMPORARY-TOPIC] -m [TEMPORARY-MESSAGE]

Options

  • --start Start the ntfy service
  • --stop Stop the ntfy service
  • --ip Set the IP address (can also accept a valid interface name)
  • --port Set the listening port
  • --message Set the default message to send
  • --topic Set the default topic to send
  • -m Use a temporary message for the current command
  • -t Use a temporary topic for the current command
  • --settings Display current ntfy settings
  • -h, --help Display this help message

About the Author

Kyser Clark is an experienced cybersecurity professional. For a full bio check out these locations:

ntfy's People

Contributors

kyserclark avatar

Stargazers

EmSec avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.