Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Change Detection
  3. Publish ChangeDetection notifications to ntfy server on same cloudron instance

Publish ChangeDetection notifications to ntfy server on same cloudron instance

Scheduled Pinned Locked Moved Change Detection
9 Posts 3 Posters 1.1k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    overclockmp
    wrote on last edited by
    #1

    Hello everyone,

    I have set up the change detection application to monitor changes on some websites. When those changes occur, I would like to send a notification to an ntfy service (also hosted on the same cloudron).

    ChangeDetection support such feature with apprise. So I can put this in settings > Notifications and it should work: ntfys://<token>@<ntfy_hostname>/changedetection

    However, I am getting the following errors:

    2024/09/09 15:08:56,000 - SENDING - null
    2024-09-09 15:09:01,045 - DEBUG - Socket Exception: HTTPSConnectionPool(host='<ntfy_hostname>', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f723024ba90>, 'Connection to <ntfy_hostname> timed out. (connect timeout=4.0)'))
    2024-09-09 15:09:01,045 - WARNING - A Connection error occurred sending ntfy:https://<ntfy_hostname> notification.
    2024-09-09 15:08:56,706 - DEBUG - ntfy Headers: {'User-Agent': 'changedetection.io', 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json', 'X-Icon': 'https://raw.githubusercontent.com/dgtlmoon/changedetection.io/master/changedetectionio/static/images/avatar-256x256.png'}
    2024-09-09 15:08:56,706 - DEBUG - ntfy Payload: {'topic': 'changedetection', 'title': 'ChangeDetection.io Notification - https://changedetection.io/CHANGELOG.txt', 'message': 'https://changedetection.io/CHANGELOG.txt had a change.\n---\n\n---'}
    2024-09-09 15:08:56,706 - DEBUG - ntfy POST URL: https://<ntfy_hostname>(cert_verify=True)
    2024-09-09 15:08:56,705 - DEBUG - Loaded ntfy URL: ntfys://t...3@<ntfy_hostname>/changedetection?priority=default&mode=private&image=yes&auth=token&avatar_url=https%3A%2F%2Fraw.githubusercontent.com%2Fdgtlmoon%2Fchangedetection.io%2Fmaster%2Fchangedetectionio%2Fstatic%2Fimages%2Favatar-256x256.png&format=text&overflow=upstream&rto=4.0&cto=4.0&verify=yes
    

    It's worth noting that I can publish notifications without any issue from ntfy client directly. I have also tried with apprise CLI, and it also works fine:
    apprise -vv -t "Test Title" -b "Test Body" ntfys://<token>@<hostname>/changedetection

    My cloudron is hosted on a server at home and I have a pihole for local DNS on the same network.

    Could I please get some help to troubleshoot this issue?

    Thank you

    1 Reply Last reply
    1
    • J joseph moved this topic from Support on
    • J Online
      J Online
      joseph
      Staff
      wrote on last edited by
      #2

      @overclockmp "Connection Error" suggests that it's not able to reach the ntfy instance. Can you check if you can curl https://ntfydomain from the Web Terminal of the Change Detection?

      1 Reply Last reply
      0
      • O Offline
        O Offline
        overclockmp
        wrote on last edited by
        #3

        Thank you for your answer.
        Indeed, the curl command cannot access the ntfy domain from the change detection's web terminal. I can still access that ntfy domain from any other device from the network though. Are there anything I need to setup to be able to access an app's domain from another app in Cloudron?

        1 Reply Last reply
        0
        • J Online
          J Online
          joseph
          Staff
          wrote on last edited by
          #4

          @overclockmp are you hosting over an internal/private network ? Maybe this is a routing issue (possible hairpin NAT issue?) You can run cloudron-support --troubleshoot and check what it says.

          1 Reply Last reply
          0
          • O Offline
            O Offline
            overclockmp
            wrote on last edited by
            #5

            It is on hosted over a private network indeed. Here's what the command shows:

            # cloudron-support --troubleshoot
            Vendor: LENOVO Product: 10FLS2AH00
            Linux: 5.15.0-119-generic
            Ubuntu: jammy 22.04
            Processor: Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz x 4
            RAM: 8018996KB
            Disk: /dev/mapper/ubuntu--vg-ubuntu--lv   66G
            [OK]	node version is correct
            [OK]	docker is running
            [OK]	MySQL is running
            [OK]	nginx is running
            [OK]	dashboard cert is valid
            [OK]	dashboard is reachable via loopback
            [OK]	box v8.0.4 is running
            [OK]	netplan is good
            [OK]	DNS is resolving via systemd-resolved
            [OK]	Dashboard is reachable via domain name
            [OK]	Domain <hostname> is valid and has not expired
            [OK]	unbound is running
            
            1 Reply Last reply
            0
            • J Online
              J Online
              joseph
              Staff
              wrote on last edited by
              #6

              @overclockmp everything looks correct. Does curl https://<ntfy_hostname> work from the Web Terminal of Change Detection app ?

              1 Reply Last reply
              0
              • O Offline
                O Offline
                overclockmp
                wrote on last edited by
                #7

                @joseph, no unfortunately, as pointed our in comment #3, I cannot curl ntfy domain from change detection's web terminal.
                I get curl: (28) Failed to connect to <ntfy_hostname> port 443 after 130253 ms: Connection timed out

                1 Reply Last reply
                0
                • girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by girish
                  #8

                  @overclockmp I assume you are hosted on an intranet/lan? I can't think of a reason why loopbacak connectivity works for the dashboard but not for the apps. If this is the case, you can try:

                  1. Update to Cloudron 8.0.5. This has a change that makes apps now use the System DNS as well.
                  2. After update, you can edit /etc/hosts of your host and then add ntfy_hostname to it with your server's intranet IP.
                  1 Reply Last reply
                  1
                  • O Offline
                    O Offline
                    overclockmp
                    wrote on last edited by
                    #9

                    The update to 8.0.5 alone made it work! Thank you @joseph and @girish!

                    1 Reply Last reply
                    1
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Bookmarks
                    • Search