Giter VIP home page Giter VIP logo

gotify-to-ntfy-proxy's Introduction

How to add Gotiy to Ntfy Proxy in Proxmox

Gotify to Ntfy Proxy

This is intended to be used with Proxmox v8+ to get Ntfy integration with the "new" notification system. At time of writing there is no native Ntfy integration in Proxmox.

Proxmox settings

Go to Datacenter > Notifications > Add > Gotify

In this example the proxy is running on "http://10.0.0.6:8008" topic on Ntfy is "your_topic_name" and the ntfy token is "tk_yoursupersecretntfytoken".

How to add Gotiy to Ntfy Proxy in Proxmox

After adding the proxy create a "Notification Matcher" or edit the default one. The proxy also works with Proxmox Backup Server since it uses the same notification system as Proxmox.

Example .env file

The protocol part of the NTFY_SEVER variable is mandatory.

NODE_ENV=production

RELAY_HOST_IP=0.0.0.0
RELAY_PORT=8008

NTFY_SERVER=https://ntfy.sh

Example topic.js file

const topics = {
  you_topic_name_one: {
    ntfyToken: 'tk_yoursupersecretntfytoken'
  },
  you_topic_name_two: {
    ntfyToken: 'tk_yoursupersecretntfytoken'
  },
}

module.exports = topics

Run local

Ensure node v20+ and yarn 1.22+ are installed

git clone https://github.com/LevantinLynx/gotify-to-ntfy-proxy.git

cd gotify-to-ntfy-proxy

cp .env.defaut .env
# Edit .env file

cp topics.defaut.js topics.js
# Edit tocics.js file
# MAKE SURE THIS IS SAVE! IT CONTAINS YOUR NTFY TOKEN/S.

yarn install

yarn start

Docker

IMPORTANT: If you are using docker container names to route between containers make sure you still use the protocol "http://" in front of the container name. Otherwise it wont work. e.g. NTFY_SERVER=http://ntfy_container_name

docker run \
  -p 8008:8008 \
  -v /path/to/your/.env:/home/node/app/.env \
  -v /path/to/your/topics.js:/home/node/app/topics.js \
  --restart unless-stopped \
  levantinlynx/gotify-to-ntfy-proxy:latest

Optionally you can also pass the environment variables instead of using the .env file or use docker compose.

version: '3.9'
services:
  gotify-to-ntfy-proxy:
    image: 'levantinlynx/gotify-to-ntfy-proxy:latest'
    restart: unless-stopped
    volumes:
      - '/path/to/your/topics.js:/home/node/app/topics.js'
    ports:
      - '8008:8008'
    environment:
      - RELAY_HOST_IP=0.0.0.0
      - RELAY_PORT=8008
      - NTFY_SERVER=https://ntfy.sh

If no environment file or variables are provided, the service will start with the following default values:

NODE_ENV=production
RELAY_HOST_IP=0.0.0.0
RELAY_PORT=8008
NTFY_SERVER=https://ntfy.sh

Credits

Thank you to all the contributers of Gotify and Ntfy for creating and maintaining such amazing and usefull software.

Logo

The gotify-to-ntfy-proxy logo is licensed under the Creative Commons Attribution 4.0 International Public License.

Gotify

The Gotify logo is licensed under the Creative Commons Attribution 4.0 International Public License. The original Go gopher was designed by Renee French (http://reneefrench.blogspot.com/).

gotify-to-ntfy-proxy's People

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.