New Add-On: Cloudflared

Which version are you running? v2.0.9 (released 3h ago) fixes an issue with watchdog.

i updated to 2.0.9 as soon as it was released. The issue i originally saw maybe 1 day ago. Not to say it started then, but it is when i saw it.

Right now my logs have the same error showing as of 1 hour 38 minutes ago.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: Cloudflared
 Use a Cloudflared tunnel (formerly Argo Tunnel) to remotely connect to Home Assistant without opening any ports
-----------------------------------------------------------
 Add-on version: 2.0.9
 You are running the latest version of this add-on.
 System: Home Assistant OS 8.4  (amd64 / qemux86-64)
 Home Assistant Core: 2022.8.4
 Home Assistant Supervisor: 2022.08.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-cloudflared-log: starting
s6-rc: info: service init-cloudflared-log successfully started
s6-rc: info: service init-cloudflared-config: starting
[10:41:38] INFO: Checking Add-on config...
[10:41:39] INFO: Checking for existing certificate...
[10:41:39] INFO: Existing certificate found
[10:41:39] INFO: Checking for existing tunnel...
[10:41:39] INFO: Existing tunnel with ID xxxxxxx found
[10:41:39] INFO: Checking if existing tunnel matches name given in config
[10:41:39] INFO: Existing Cloudflare tunnnel name matches config, proceeding with existing tunnel file
[10:41:39] INFO: Creating config file...
[10:41:40] INFO: Validating config file...
Validating rules from /tmp/config.json
OK
[10:41:40] INFO: Creating new DNS entry xxxxxxx...
2022-08-15T13:41:41Z INF xxxxxxx is already configured to route to your tunnel tunnelID=xxxxxxx
[10:41:41] INFO: Finished setting-up the Cloudflare tunnel
s6-rc: info: service init-cloudflared-config successfully started
s6-rc: info: service cloudflared: starting
s6-rc: info: service cloudflared successfully started
s6-rc: info: service healthcheck: starting
s6-rc: info: service healthcheck successfully started
s6-rc: info: service legacy-services: starting
[10:41:41] INFO: Starting Cloudflared Healthcheck for Home-Assistant add-on.
s6-rc: info: service legacy-services successfully started
[10:41:42] INFO: Connecting Cloudflared Tunnel...
2022-08-15T13:41:42Z INF Starting tunnel tunnelID=xxxxxxx
2022-08-15T13:41:42Z INF Version 2022.8.0
2022-08-15T13:41:42Z INF GOOS: linux, GOVersion: go1.18, GoArch: amd64
2022-08-15T13:41:42Z INF Settings: map[config:/tmp/config.json cred-file:/data/tunnel.json credentials-file:/data/tunnel.json loglevel:info metrics:0.0.0.0:36500 no-autoupdate:true origincert:/data/cert.pem]
2022-08-15T13:41:42Z INF Generated Connector ID: xxxxxxx
2022-08-15T13:41:42Z INF Initial protocol quic
2022-08-15T13:41:42Z INF Starting metrics server on [::]:36500/metrics
[10:41:42] WARNING: Connection unavailable, rechecking in 5 seconds.
[10:41:42] WARNING: Connection attempt 1/24 before restart.
2022-08-15T13:41:42Z INF Connection xxxxxxx registered connIndex=0 ip=198.41.200.33 location=ORD
2022-08-15T13:41:42Z INF Connection xxxxxxxregistered connIndex=1 ip=198.41.192.27 location=EWR
2022-08-15T13:41:43Z INF Connection xxxxxxx registered connIndex=2 ip=198.41.200.23 location=ORD
2022-08-15T13:41:44Z INF Connection xxxxxxx registered connIndex=3 ip=198.41.192.37 location=EWR

The log looks correct, the connection was established. What problems do you currently have with the tunnel?
As I said, the “Warning” is no problem.

For me the issue was that when accessing via external URL the connection would drop every few minutes, something like when you manually restart. But this was not occurring when viewing internally, this is what led me to check the cloudflared logs as I knew the system was not actually restarting.

Id have to be looking at the dashboard for a while in order to catch it but it was causing some automations to fail.

I havent spent a long time watching the dashboard this morning as Ive been at work but I will monitor as soon as I have a chance to and see if 2.0.9 fixed this earlier (i switched watchdog off prior to that update as i wanted to disable the add-on for a short while, I have re enabled watchdog now).

This should be fixed with 2.0.9

1 Like
-----------------------------------------------------------
 Add-on: Cloudflared
 Use a Cloudflared tunnel (formerly Argo Tunnel) to remotely connect to Home Assistant without opening any ports
-----------------------------------------------------------
 Add-on version: 2.0.9
 You are running the latest version of this add-on.
 System: Home Assistant OS 8.4  (amd64 / qemux86-64)
 Home Assistant Core: 2022.7.5
 Home Assistant Supervisor: 2022.08.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-cloudflared-log: starting
s6-rc: info: service init-cloudflared-log successfully started
s6-rc: info: service init-cloudflared-config: starting
[16:22:28] INFO: Checking Add-on config...
[16:22:29] INFO: Checking for existing certificate...
[16:22:29] INFO: Existing certificate found
[16:22:29] INFO: Checking for existing tunnel...
[16:22:29] INFO: Existing tunnel with ID 3baee181-e604-4b1b-9c2d-0c5287b5f0ec found
[16:22:29] INFO: Checking if existing tunnel matches name given in config
[16:22:30] INFO: Existing Cloudflare tunnnel name matches config, proceeding with existing tunnel file
[16:22:30] INFO: Creating config file...
[16:22:30] INFO: Validating config file...
Validating rules from /tmp/config.json
OK
[16:22:31] INFO: Creating new DNS entry ...
2022-08-15T14:22:32Z INF kyoshiro.cf is already configured to route to your tunnel tunnelID=3baee181-e604-4b1b-9c2d-0c5287b5f0ec
[16:22:32] INFO: Finished setting-up the Cloudflare tunnel
s6-rc: info: service init-cloudflared-config successfully started
s6-rc: info: service cloudflared: starting
s6-rc: info: service cloudflared successfully started
s6-rc: info: service healthcheck: starting
s6-rc: info: service healthcheck successfully started
s6-rc: info: service legacy-services: starting
[16:22:32] INFO: Starting Cloudflared Healthcheck for Home-Assistant add-on.
s6-rc: info: service legacy-services successfully started
[16:22:32] INFO: Connecting Cloudflared Tunnel...
2022-08-15T14:22:32Z INF Starting tunnel tunnelID=3baee181-e604-4b1b-9c2d-0c5287b5f0ec
2022-08-15T14:22:32Z INF Version 2022.8.0
2022-08-15T14:22:32Z INF GOOS: linux, GOVersion: go1.18, GoArch: amd64
2022-08-15T14:22:32Z INF Settings: map[config:/tmp/config.json cred-file:/data/tunnel.json credentials-file:/data/tunnel.json loglevel:info metrics:0.0.0.0:36500 no-autoupdate:true origincert:/data/cert.pem]
2022-08-15T14:22:32Z INF Generated Connector ID: a765cacb-f4f9-4408-af2c-3b9fcad9bfc1
2022-08-15T14:22:32Z INF Initial protocol quic
2022-08-15T14:22:32Z INF Starting metrics server on [::]:36500/metrics
[16:22:32] WARNING: Connection unavailable, rechecking in 5 seconds.
[16:22:32] WARNING: Connection attempt 1/24 before restart.
2022-08-15T14:22:33Z INF Connection b16c2b94-a0fe-4f37-a90b-99fbb192c4c9 registered connIndex=0 ip=198.41.200.23 location=WAW
2022-08-15T14:22:33Z INF Connection 1e097c05-f729-4d33-b16b-c70cbcbabb0f registered connIndex=1 ip=198.41.192.37 location=PRG
2022-08-15T14:22:35Z INF Connection 48680c25-22a6-4dbc-83ac-a057c940bc19 registered connIndex=2 ip=198.41.200.33 location=WAW
2022-08-15T14:22:36Z INF Connection 6a864cfc-3a44-4e45-9f05-c82eda511920 registered connIndex=3 ip=198.41.192.7 location=PRG

This is mine full log of startup but it started working now. Sorry for false alarm.

1 Like

Hello.

I’m having a strange issue where the addon is on and working but HA shows it’s off and after a while it stops working. Here’s my log:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
Add-on: Cloudflared
Use a Cloudflared tunnel (formerly Argo Tunnel) to remotely connect to Home Assistant without opening any ports
Add-on version: 2.0.11
You are running the latest version of this add-on.
System: Home Assistant OS 8.4 (amd64 / generic-x86-64)
Home Assistant Core: 2022.8.4
Home Assistant Supervisor: 2022.08.3
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-cloudflared-log: starting
s6-rc: info: service init-cloudflared-log successfully started
s6-rc: info: service init-cloudflared-config: starting
[21:55:58] INFO: Checking Add-on config…
[21:55:58] INFO: Checking for existing certificate…
[21:55:58] INFO: Existing certificate found
[21:55:58] INFO: Checking for existing tunnel…
[21:55:58] INFO: Existing tunnel with ID 658e6bdd-5b57-4cc7-b04c-f75f64b5cf07 found
[21:55:58] INFO: Checking if existing tunnel matches name given in config
2022-08-16T21:55:59Z WRN Your version 2022.8.1 is outdated. We recommend upgrading it to 2022.8.2
[21:55:59] INFO: Existing Cloudflare tunnnel name matches config, proceeding with existing tunnel file
[21:56:00] INFO: Creating config file…
[21:56:00] INFO: Validating config file…
Validating rules from /tmp/config.json
OK
[21:56:00] INFO: Creating new DNS entry casa.zirius.is…
2022-08-16T21:56:02Z INF casa.zirius.is is already configured to route to your tunnel tunnelID=658e6bdd-5b57-4cc7-b04c-f75f64b5cf07
[21:56:02] INFO: Finished setting-up the Cloudflare tunnel
s6-rc: info: service init-cloudflared-config successfully started
s6-rc: info: service cloudflared: starting
s6-rc: info: service cloudflared successfully started
s6-rc: info: service healthcheck: starting
s6-rc: info: service healthcheck successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[21:56:02] INFO: Starting Cloudflared Healthcheck for Home-Assistant add-on.
[21:56:02] INFO: Connecting Cloudflared Tunnel…
2022-08-16T21:56:02Z INF Starting tunnel tunnelID=658e6bdd-5b57-4cc7-b04c-f75f64b5cf07
2022-08-16T21:56:02Z INF Version 2022.8.1
2022-08-16T21:56:02Z INF GOOS: linux, GOVersion: go1.18.5, GoArch: amd64
2022-08-16T21:56:02Z INF Settings: map[config:/tmp/config.json cred-file:/data/tunnel.json credentials-file:/data/tunnel.json loglevel:info metrics:0.0.0.0:36500 no-autoupdate:true origincert:/data/cert.pem]
2022-08-16T21:56:02Z INF Generated Connector ID: 249aad0e-3e70-4bf2-a0fe-9af92692a227
2022-08-16T21:56:02Z INF Initial protocol quic
2022-08-16T21:56:02Z INF Starting metrics server on [::]:36500/metrics
2022-08-16T21:56:03Z WRN Your version 2022.8.1 is outdated. We recommend upgrading it to 2022.8.2
2022-08-16T21:56:03Z INF Connection a929c3ba-bb1b-4a72-9858-82b91736719a registered connIndex=0 ip=198.41.200.73 location=KEF
2022-08-16T21:56:04Z INF Connection 33e2abc2-89bf-4986-96bc-ed4e2668b6c2 registered connIndex=1 ip=198.41.192.227 location=LHR
2022-08-16T21:56:05Z INF Connection 52a131ab-ebff-4c05-8ece-04c561ce95a9 registered connIndex=2 ip=198.41.200.53 location=KEF
2022-08-16T21:56:06Z INF Connection ef4bc6ec-3e10-4024-9466-2eed2354fe25 registered connIndex=3 ip=198.41.192.27 location=LHR>

Here is also a picture that shows that everything is on but still off?

Thank you.

1 Like

When you say it’s on, that image says not so. It has a start button. Press it and see if it changes
Mine has a stop and restart and the dot is green. Maybe it’s stopped

It is on because the logs show the text I quoted above. If it was off there would be no logs.

Hi EveryOne

thanks :slightly_smiling_face:

Tobias :wave:

Thx for this! I’m using the add-on since almost a year and it always worked flawlessly. :slight_smile:

1 Like

This application worked just fine when I only used my domain name in the configuration

additional_hosts: []
external_hostname: mydomain.me
tunnel_name: homeassistant
tunnel_token: ""

But I want to use a subdomain so I changed external_hostname as below:

additional_hosts: []
external_hostname: name.ocean.mydomain.me
tunnel_name: homeassistant
tunnel_token: ""

I uninstalled and reinstalled it per instructions. The tunnel correctly connected to cloudflare and it shows success:

2022-08-21T23:42:16Z INF Initial protocol quic
2022-08-21T23:42:16Z INF Starting metrics server on [::]:36500/metrics
2022-08-21T23:42:16Z INF Connection 3cfcc284-6be2-4eb2-844c-d475c940b42e registered connIndex=0 ip=198.41.200.53 location=ORD
2022-08-21T23:42:17Z INF Connection 09b87c78-a855-47c1-a82d-02b8f0141bae registered connIndex=1 ip=198.41.192.37 location=EWR
2022-08-21T23:42:18Z INF Connection 7e34e3d9-ca14-441f-bdd8-dd318df26ef7 registered connIndex=2 ip=198.41.200.193 location=ORD
2022-08-21T23:42:19Z INF Connection b748c830-3b1a-48bd-aa2f-b4234adf4b74 registered connIndex=3 ip=198.41.192.227 location=EWR

BUT when trying to connect - https://name.ocean.mydomain.me - it fails. Yet it worked when I only used mydomain.me. (I’m running on DigitalOcean.)

Any suggestions?

Maybe it doesn’t like the additional subdomain (instead of simple hostname, e.g. name.mydomain.me)? But what exactly is not working?

Right you are. It’s so obvious (after-the-fact). I switched to a single subdomain and instantly it worked. Thanks for reminding me of the obvious. The problem was that the browser returned " This site can’t provide a secure connection".

BTW - this is a great Addon. Compliments to Tobias. Thank you.

Question resolved.

this is one of the best Add-Ons I have seen so far!!!

just a couple of questions, please:

  • I managed to add in Cloudflare a free domain from Freenom, but when I tried to add a “paid” domain registered in AWS Route 53, it seems I cannot manage to get Cloudflare updating the DNS… I have taken NS records form Cloudflare and placed them in Route 53, but no luck… is there any trick to use AWS as the register?

  • it there a way to use a third level domain as the Home Assistant URL? lets assume I have mydomain.com, can I use haos.mydomain.com as the Home Assistant url, while the mydomain.com is still a website hosted in AWS?

thank you all!

Love this. It’s working really well. One problem (on hass.io RPi 4), when it auto updates it dies and does not start itself. Watchdog is active, auto start and restart are active, but I keep losing access because every time an update comes along it does not start itself. I’ve turned off Auto updates at the moment but this seems not the best idea. Any way to get the add on to start itself after an update?

I am currently running into an issue where the tunneling using freenom and cloudflared addon is seeming to not have an internet connection.


Can I please have some tips to trouble shoot this? I have check both the cloudflared site and freenom and it seems like everything is good on those sites, but I don’t have the experience to completely verify those claims.

I have the same problem! It just came with the latest update.

I’m glad I’m not the only one.

I have this bug too