Cloudflared auto update

tunnel:
credentials-file: 

protocol: quic
autoupdate-freq: 24h
originRequest:
  connectTimeout: 30s
loglevel: info
logfile: /

ingress:
  - hostname: 
    service: https://localhost:443
    originRequest:
      connectTimeout: 10s
      originServerName: 
      noTLSVerify: true
  - hostname: 
    service: ssh://localhost:22
  - service: http_status:404
  
warp-routing:
  enabled: true

Could anyone tell if it’s correct and also does this auto update even update the package automatically and restart the connection

It should be fine.

https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/arguments#autoupdate-freq

PS: I only recommend auto-update in your development environment. In production, you should only update after testing in your dev env. It is quite common to Cloudflare several patches in a short period of time (hours-days), following 2-3 weeks of no update.

1 Like

The auto-update feature has some limitations to be aware of:

  • it does not work in Windows
  • it does not work if you run cloudflared as a one-off command in the shell; i.e., it only works when run as a service (e.g. systemd in Linux)
  • it does not work if cloudflared is installed with a package manager (e.g. apt in Linux); in that case it must be updated with the said package manager

Each of these cases is warned by cloudflared in the logging with the corresponding messages: cloudflared/update.go at master · cloudflare/cloudflared · GitHub

2 Likes

It’s running as service and PKG

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

I have enabled cloudflared auto updating and still it’s not updating installed through PKG on Ubuntu it’s on 2021.12.3

That would be expected no?

  • it does not work if cloudflared is installed with a package manager (e.g. apt in Linux); in that case it must be updated with the said package manager

@cscharff I used this cmd

echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/ focal main' |
sudo tee /etc/apt/sources.list.d/cloudflare-main.list

Then sudo apt-get update

Then sudo apt get install cloudflared

Well that’s how I installed, will it not work?

Correct

But why is that not working, any way to see if auto update is enabled

As @nuno.diegues stated, when deployed via a package manager it needs to be updated the same way.

Can you tell me the right way to install so that it automatically update

This is what I did:

   79  wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-amd64.deb
   80  apt install ./cloudflared-stable-linux-amd64.deb 

Download links are here:
https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation

@sdayman will it autoupdate? I thought installation of cloudflared from PKG or repo of cloudflare will autoupdate my bad

It updates, but for the reasons @adaptive stated, I don’t autoupdate. Manual only. I could easily “autoupdate” with a cron to update and restart service.

1 Like

@sdayman

Used your command but still

Which command? My wget and apt install? After you removed the old cloudflared package?

sudo wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb

sudo dpkg -i ./cloudflared-linux-amd64.deb.1


🤷🤷 @sdayman

It looks like you didn’t do this: :point_down: