Publish ChangeDetection notifications to ntfy server on same cloudron instance
-
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
-
-
@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? -
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? -
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
-
@overclockmp everything looks correct. Does
curl https://<ntfy_hostname>
work from the Web Terminal of Change Detection app ? -
@joseph, no unfortunately, as pointed our in comment #3, I cannot curl ntfy domain from change detection's web terminal.
I getcurl: (28) Failed to connect to <ntfy_hostname> port 443 after 130253 ms: Connection timed out
-
@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:
- Update to Cloudron 8.0.5. This has a change that makes apps now use the System DNS as well.
- After update, you can edit /etc/hosts of your host and then add ntfy_hostname to it with your server's intranet IP.