New Add-On: Cloudflared

Recently I have had a problem connecting from outside my network.
Everything seems OK.
I erased all the private data of the website as well as the tunnel info,

 Use a Cloudflare Tunnel to remotely connect to Home Assistant without opening any ports
-----------------------------------------------------------
 Add-on version: 5.1.19
 You are running the latest version of this add-on.
 System: Home Assistant OS 13.1  (aarch64 / raspberrypi3-64)
 Home Assistant Core: 2024.9.1
 Home Assistant Supervisor: 2024.09.1
-----------------------------------------
[14:21:54] INFO: Checking add-on config...
[14:21:55] INFO: Checking for existing certificate...
[14:21:55] INFO: Existing certificate found
[14:21:55] INFO: Checking for existing tunnel...
[14:21:55] INFO: Existing tunnel with ID xxxxa383 found
[14:21:55] INFO: Checking if existing tunnel matches name given in config
2024-09-16T11:22:03Z WRN Your version 2024.8.3 is outdated. We recommend upgrading it to 2024.9.1
[14:22:03] INFO: Existing Cloudflare Tunnel name matches config, proceeding with existing tunnel file
[14:22:03] INFO: Creating config file...
[14:22:05] INFO: Validating config file...
Validating rules from /tmp/config.json
OK
[14:22:05] INFO: Creating DNS entry xxxx.xyz...
2024-09-16T11:22:07Z INF xxxx.xyz is already configured to route to your tunnel tunnelID=xxxxxxxxxx
[14:22:07] INFO: Finished setting up the Cloudflare Tunnel
[14:22:08] INFO: Connecting Cloudflare Tunnel...

Only indication is as follows:

2024-09-21T07:46:21Z INF Retrying connection in up to 2s connIndex=3 event=0 ip=198.41.192.167
2024-09-21T07:46:22Z WRN Connection terminated error="already connected to this server, trying another address" connIndex=3
2024-09-21T07:46:43Z INF Registered tunnel connection connIndex=3 connection=xxxxx event=0 ip=198.41.192.227 location=tlv02 protocol=quic
2024-09-21T08:11:19Z ERR  error="Incoming request ended abruptly: context canceled" connIndex=2 event=1 ingressRule=0 originService=http://homeassistant:8123
2024-09-21T08:11:19Z ERR Request failed error="Incoming request ended abruptly: context canceled" connIndex=2 dest=https://xxxx.xyz/ event=0 ip=198.41.200.13 type=http

I have the same problem. As much as restarting the add-on, home assistant, host or router, nothing makes it work.

Any idea?

Edit:

At least for me the solution is to change the protocol used to establish the connection, adding a command on “run parameters” section through addon configuration page.

Changing from “quic” to “html2” works.

run_parameters:
  - "--protocol=http2"

Trying to use the Asterisk addon for HomeAssistant, but can’t set it up as ssl certs have to be in default location (/ssl/) which they obviously aren’t when using the Cloudflared addon. Any ideas how to get the necessary certs to put in the ssl directory would be much appreciated!

Hi,

Up until now i had HA and some other services exposed with Nginx Proxy Manager and DuckDNS addons. Had 5 domains in DuckDNS and 5 Proxy Hosts in NPM with Let’s Encrypt certificates. This setup has been running for more then a year without major problems.

But recently my internet provider changed to CGNAT, so now i don’t get a dynamic IPv4 address anymore :frowning:
So obviosly nothing works.

Would this addon work for this case? to be able to access my 5 proxies from anywhere ? I’m not tech savvy so i’d better ask before i start breaking things.

Thank you