cloudflared
cloudflared copied to clipboard
pkg.cloudflare.com changes
What is changing
pkg.cloudflare.com is now being upgraded to include packages belonging to newer Debian, Ubuntu and RHEL releases such as Bullseye, Bookworm, Jammy, 8.0 etc. We are also upgrading our backend services to a new and improved hosting system which utilizes Cloudflare's R2 solution.
What does this mean for me?
There will be minor changes to your apt sources.list. As an example, a new download for buster may look like this:
# Add cloudflare gpg key
sudo mkdir -p --mode=0755 /usr/share/keyrings
curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null
# Add this repo to your apt repositories
echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared buster main' > /etc/apt/sources.list.d/cloudflared.list
# install cloudflared
sudo apt-get update && sudo apt-get install cloudflared
Users of releases > buster, bionic and 6.0 will now be able to download cloudflared by adding this apt/rpm repository.
What stays the same
We will continue to use the same package signing keys as before. Older releases will continue to have cloudflared packages that are downloadable as long as Debian and RHEL support them.
What will change
Newer .deb and yum based releases should also let you download cloudflared. Users can also do this from ARM based systems like raspberry pi, etc. (NOTE: armel is not yet supported). \
-
The repo url now has
cloudflared
appended to it: https://github.com/cloudflare/cloudflared/issues/719#issuecomment-1209548504 -
The old rpm locations are now under
pkg.cloudflare.com/cloudflared/rpm
. Here's a sample instruction for yum installation for centos 8: https://pkg.cloudflare.com/#centos-8
What if I encounter problems
Report them here in this thread.
I was having an issue updating cloudflared
using apt on Ubuntu Focal.
Reading package lists... Done
E: The repository 'https://pkg.cloudflare.com focal Release' no longer has a Release file.
To fix it, I had to edit /etc/apt/sources.list.d/cloudflare-main.list
and change the file to read as follows:
deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared focal main
Where previously the url referenced was just https://pkg.cloudflare.com and didn't have the /cloudflared
part.
Thank you for posting this. This was largely intentional and I should have mentioned it in the over-all issue. I've linked your excellent explanation now instead.
I switched to this:
deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared focal main
Is anyone receiving this notice when they run apt update
?
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://pkg.cloudflare.com/cloudflared focal InRelease' doesn't support architecture 'i386'
I'm on an x64 machine (Ubuntu Focal). So, does this matter?
rpm user OS is Amazon Linux 2 this is breaking updating the software but also for spinning up new infrastructure for our team of dev/engineers and myself. :( this came a bit of a shock to me and another engineer, a breaking change.
wget http://pkg.cloudflare.com/cloudflare-release-latest.el7.rpm
--2022-08-10 14:28:20-- http://pkg.cloudflare.com/cloudflare-release-latest.el7.rpm
Resolving pkg.cloudflare.com (pkg.cloudflare.com)... 104.18.1.118, 104.18.0.118, 2606:4700::6812:176, ...
Connecting to pkg.cloudflare.com (pkg.cloudflare.com)|104.18.1.118|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-08-10 14:28:20 ERROR 404: Not Found.
yum info cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
Name : cloudflared
Arch : x86_64
Version : 2022.6.3
Release : 1
Size : 32 M
Repo : installed
From repo : cloudflare
Summary : Cloudflare Tunnel daemon
URL : https://github.com/cloudflare/cloudflared
License : Apache License Version 2.0
Description : Cloudflare Tunnel daemon
Available Packages
Name : cloudflared
Arch : x86_64
Version : 2022.7.1
Release : 1
Size : 14 M
Repo : cloudflare/x86_64
Summary : Cloudflare Tunnel daemon
URL : https://github.com/cloudflare/cloudflared
License : Apache License Version 2.0
Description : Cloudflare Tunnel daemon
yum info cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
Name : cloudflared
Arch : x86_64
Version : 2022.6.3
Release : 1
Size : 32 M
Repo : installed
From repo : cloudflare
Summary : Cloudflare Tunnel daemon
URL : https://github.com/cloudflare/cloudflared
License : Apache License Version 2.0
Description : Cloudflare Tunnel daemon
Available Packages
Name : cloudflared
Arch : x86_64
Version : 2022.7.1
Release : 1
Size : 14 M
Repo : cloudflare/x86_64
Summary : Cloudflare Tunnel daemon
URL : https://github.com/cloudflare/cloudflared
License : Apache License Version 2.0
Description : Cloudflare Tunnel daemon
[root@ip-172-31-29-124 ~]# yum update cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00:00
http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package cloudflared.x86_64 0:2022.6.3-1 will be updated
---> Package cloudflared.x86_64 0:2022.7.1-1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Updating:
cloudflared x86_64 2022.7.1-1 cloudflare 14 M
Transaction Summary
=============================================================================================================================================================================================
Upgrade 1 Package
Total download size: 14 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
http://pkg.cloudflare.com//pool/el7/main/c/cloudflared-2022.7.1-1.src.rpm/cloudflared-2022.7.1-1.x86_64.rpm: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
Error downloading packages:
cloudflared-2022.7.1-1.x86_64: failed to retrieve /pool/el7/main/c/cloudflared-2022.7.1-1.src.rpm/cloudflared-2022.7.1-1.x86_64.rpm from cloudflare
error was [Errno 14] HTTP Error 404 - Not Found
Apologies for this.
This was a change we absolutely needed to do in order to provide modern pkgs and will most likely never break in the future.
http://pkg.cloudflare.com/cloudflared/rpm/x86_64/cloudflared-linux-x86_64.rpm is the new location.
Although, if you want a stable location to download just the rpm, the recommended location is our github releases here: https://github.com/cloudflare/cloudflared/releases that's historically always had the latest rpms.
Apologies for this.
This was a change we absolutely needed to do in order to provide modern pkgs and will most likely never break in the future.
http://pkg.cloudflare.com/cloudflared/rpm/x86_64/cloudflared-linux-x86_64.rpm is the new location.
Although, if you want a stable location to download just the rpm, the recommended location is our github releases here: https://github.com/cloudflare/cloudflared/releases that's historically always had the latest rpms.
Hello firstly thanks for this.
Will this seamlessly upgrade on existing machines that have the software installed or will it treat it as a 'new' installation and create new configuration files ?
Also does this package take care of upgrades as in an rpm repository or is the way going forward via github releases for the developer/engineer to work this logic out for themselves ?
The way for installing rpm is followed from the documentation I was pointed towards erm well by cloudflare which you'll see shows the exact url to download https://pkg.cloudflareclient.com/cloudflare-release-el<VERSION>.rpm
which I found initially giving 404 error's periodically hence changing it to http://pkg.cloudflare.com/cloudflare-release-latest.el7.rpm
and that worked perfectly and has been for quite a long time now.
It would help not having different sets of instructions, especially for repeatability for devops engineers, at the least a graceful period of a 301 redirect to give the community time to plan for this instead of a hard 404.
Will this seamlessly upgrade on existing machines that have the software installed or will it treat it as a 'new' installation and create new configuration files ?
This will be seamless.
The only part that will change is how you obtain these packages (i.e. If you use yum/apt to install , the repository location will change will be minor: i.e an rpm prefix for yum and a cloudflared prefix for apt).
The way for installing rpm is followed from the documentation I was pointed towards erm well by cloudflare which you'll see shows the exact url to download https://pkg.cloudflareclient.com/cloudflare-release-el<VERSION>.rpm which I found initially giving 404 error's periodically hence changing it to http://pkg.cloudflare.com/cloudflare-release-latest.el7.rpm and that worked perfectly and has been for quite a long time now.
The documentation you've linked does not have instructions to download the rpm from pkg.cloudflare.com. I'll try and add it to our developer documents here: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation/
Hi @sudarshan-reddy is there a .gpg
for the .rpm version please ?
https://pkg.cloudflare.com/pubkey.gpg worked previously, but now gives a 404.
Although https://pkg.cloudflareclient.com/pubkey.gpg is still there, should that used ?
I tried the one in here and this comes back msg: 'Not a public key: https://pkg.cloudflare.com/cloudflare-main.gpg'
but it is not a PGP Public Key
pkg.cloudflare.com is now being upgraded to include packages belonging to newer Debian, Ubuntu and RHEL releases
Also what should be contained within /etc/yum.repos.d/cloudflare.repo
be now as this no longer works as it breaks yum install and yum update, not a great developer experience.
[cloudflare]
name=CloudFlare Packages
baseurl=http://pkg.cloudflare.com/dists/7/main/binary-$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CLOUDFLARE-2
RHEL/Amazon Linux rpm packages are being treated as second class citizens when they are first class for businesses, enterprise, SaaS, hosting providers and AWS (Amazon Linux 2) OS.
I feel there should have been more preparation done here by cloudflare and testing before such a short announcement and impacting users, update documentation for transitioning (see the yum package manager impact), one liner of 'old' rpm's, it's scattered, fragmented, messy and ill thought through.
The only part that will change is how you obtain these packages (i.e. If you use yum/apt to install , the repository location will change will be minor: i.e an rpm prefix for yum and a cloudflared prefix for apt).
rpm prefix where ? https://i.imgflip.com/3gpr67.jpg
http://pkg.cloudflare.com/rpm/dists/7/main/binary-x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
http://pkg.cloudflare.com/cloudflared/rpm/dists/7/main/binary-x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
The old rpm locations are now under pkg.cloudflare.com/cloudflared/rpm .
This is flying blind as just hitting that and constructing what might be the locations just gives Object Not Found
ull_resource.run_ansible_ec2_install_software (local-exec): fatal: [REMOVED]: FAILED! => changed=false
null_resource.run_ansible_ec2_install_software (local-exec): msg: |-
null_resource.run_ansible_ec2_install_software (local-exec): http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
null_resource.run_ansible_ec2_install_software (local-exec): Trying other mirror.
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): One of the configured repositories failed (CloudFlare Packages),
null_resource.run_ansible_ec2_install_software (local-exec): and yum doesn't have enough cached data to continue. At this point the only
null_resource.run_ansible_ec2_install_software (local-exec): safe thing yum can do is fail. There are a few ways to work "fix" this:
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): 1. Contact the upstream for the repository and get them to fix the problem.
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): 2. Reconfigure the baseurl/etc. for the repository, to point to a working
null_resource.run_ansible_ec2_install_software (local-exec): upstream. This is most often useful if you are using a newer
null_resource.run_ansible_ec2_install_software (local-exec): distribution release than is supported by the repository (and the
null_resource.run_ansible_ec2_install_software (local-exec): packages for the previous distribution release still work).
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): 3. Run the command with the repository temporarily disabled
null_resource.run_ansible_ec2_install_software (local-exec): yum --disablerepo=cloudflare ...
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): 4. Disable the repository permanently, so yum won't use it by default. Yum
null_resource.run_ansible_ec2_install_software (local-exec): will then just ignore the repository until you permanently enable it
null_resource.run_ansible_ec2_install_software (local-exec): again or use --enablerepo for temporary usage:
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): yum-config-manager --disable cloudflare
null_resource.run_ansible_ec2_install_software (local-exec): or
null_resource.run_ansible_ec2_install_software (local-exec): subscription-manager repos --disable=cloudflare
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): 5. Configure the failing repository to be skipped, if it is unavailable.
null_resource.run_ansible_ec2_install_software (local-exec): Note that yum will try to contact the repo. when it runs most commands,
null_resource.run_ansible_ec2_install_software (local-exec): so will have to try and fail each time (and thus. yum will be be much
null_resource.run_ansible_ec2_install_software (local-exec): slower). If it is a very temporary problem though, this is often a nice
null_resource.run_ansible_ec2_install_software (local-exec): compromise:
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): yum-config-manager --save --setopt=cloudflare.skip_if_unavailable=true
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): failure: repodata/repomd.xml from cloudflare: [Errno 256] No more mirrors to try.
null_resource.run_ansible_ec2_install_software (local-exec): http://pkg.cloudflare.com/dists/7/main/binary-x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
null_resource.run_ansible_ec2_install_software (local-exec): rc: 1
null_resource.run_ansible_ec2_install_software (local-exec): results: []
Workaround for me (no longer have yum install and yum update support) is:
rpm -ivh http://pkg.cloudflare.com/cloudflared/rpm/x86_64/cloudflared-linux-x86_64.rpm
dnf config-manager --add-repo https://pkg.cloudflare.com/cloudflared.repo
Adding repo from: https://pkg.cloudflare.com/cloudflared.repo
[root@e4462979a362 yum.repos.d]# dnf install cloudflared
cloudflared-stable 2.6 kB/s | 1.3 kB 00:00
Dependencies resolved.
==============================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================
Installing:
cloudflared x86_64 2022.8.0-1 cloudflared-stable 15 M
Transaction Summary
==============================================================================================================================
Install 1 Package
Total download size: 15 M
Installed size: 30 M
Is this ok [y/N]: y
Downloading Packages:
cloudflared-linux-x86_64.rpm 10 MB/s | 15 MB 00:01
------------------------------------------------------------------------------------------------------------------------------
Total 10 MB/s | 15 MB 00:01
cloudflared-stable 2.4 kB/s | 640 B 00:00
Importing GPG key 0x8CACCBF8:
Userid : "CloudFlare Software Packaging <[email protected]>"
Fingerprint: FBA8 C0EE 6361 7C5E ED69 5C43 254B 391D 8CAC CBF8
From : https://pkg.cloudflare.com/cloudflare-main.gpg
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : cloudflared-2022.8.0-1.x86_64 1/1
Running scriptlet: cloudflared-2022.8.0-1.x86_64 1/1
Verifying : cloudflared-2022.8.0-1.x86_64 1/1
Installed:
cloudflared-2022.8.0-1.x86_64
Complete!
Works.
It's an absolutely fair call-out that the yum instructions were not detailed. That was an oversight on my part and completely unintentional. I'll fix that now.
This pkg update was largely done because it's a popular community request and has been in beta for over a month with a bunch of debian users helping beta test it and report issues right here in github.
I'll update the instructions for rpm in a moment.
https://pkg.cloudflare.com/#centos-8 exists now.
Need Amazon Linux 2 without DNF support. See https://aws.amazon.com/amazon-linux-2/faqs/#:~:text=Q.%20Why%20does%20Amazon%20Linux%202%20not%20switch%20away%20from%20Python%202.7%20for%20the%20%27yum%27%20package%20manager%2C%20or%20move%20to%20DNF%2C%20which%20is%20Python%203%20based%3F
Amazon Linux 2022 is not yet available. https://docs.aws.amazon.com/linux/al2022/ug/managing-repos-os-updates.html
Please fix
cat cloudflared.repo
[cloudflared]
async = 1
baseurl = https://pkg.cloudflare.com/cloudflared.repo
gpgcheck = 1
gpgkey = https://pkg.cloudflare.com/cloudflare-main.gpg
name = cloudflared
[root@ip-172-31-23-98 yum.repos.d]# yum install cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
https://pkg.cloudflare.com/cloudflared.repo/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
One of the configured repositories failed (cloudflared),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=cloudflared ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable cloudflared
or
subscription-manager repos --disable=cloudflared
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=cloudflared.skip_if_unavailable=true
failure: repodata/repomd.xml from cloudflared: [Errno 256] No more mirrors to try.
https://pkg.cloudflare.com/cloudflared.repo/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Ah hold on....
baseurl=https://pkg.cloudflare.com/cloudflared/rpm
curl https://pkg.cloudflare.com/cloudflared.repo
[cloudflared-stable]
name=cloudflared-stable
baseurl=https://pkg.cloudflare.com/cloudflared/rpm
enabled=1
type=rpm
gpgcheck=1
gpgkey=https://pkg.cloudflare.com/cloudflare-main.gpg
Simply curling the repo works with yum. As far as an rpm install is concerned, all the metadata that is needed is in the repo. There is nothing to fix here except maybe a walkthrough for non dnf installs.
Retesting it as it's ansible the yum_repository module needing fixing, reverting to just downloading that .repo file directly....
yum install yum-utils
Last metadata expiration check: 0:04:26 ago on Thu 11 Aug 2022 11:11:28 AM UTC.
Dependencies resolved.
==============================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================
Installing:
yum-utils noarch 4.0.21-3.el8 baseos 73 k
Installing dependencies:
dbus-glib x86_64 0.110-2.el8 baseos 127 k
dnf-plugins-core noarch 4.0.21-3.el8 baseos 70 k
python3-dateutil noarch 1:2.6.1-6.el8 baseos 251 k
python3-dbus x86_64 1.2.4-15.el8 baseos 134 k
python3-dnf-plugins-core noarch 4.0.21-3.el8 baseos 234 k
python3-six noarch 1.11.0-8.el8 baseos 38 k
Transaction Summary
==============================================================================================================================
Install 7 Packages
Total download size: 927 k
Installed size: 2.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): dnf-plugins-core-4.0.21-3.el8.noarch.rpm 221 kB/s | 70 kB 00:00
(2/7): python3-dbus-1.2.4-15.el8.x86_64.rpm 2.1 MB/s | 134 kB 00:00
(3/7): python3-dateutil-2.6.1-6.el8.noarch.rpm 654 kB/s | 251 kB 00:00
(4/7): python3-six-1.11.0-8.el8.noarch.rpm 739 kB/s | 38 kB 00:00
(5/7): python3-dnf-plugins-core-4.0.21-3.el8.noarch.rpm 4.0 MB/s | 234 kB 00:00
(6/7): yum-utils-4.0.21-3.el8.noarch.rpm 1.4 MB/s | 73 kB 00:00
(7/7): dbus-glib-0.110-2.el8.x86_64.rpm 255 kB/s | 127 kB 00:00
------------------------------------------------------------------------------------------------------------------------------
Total 1.8 MB/s | 927 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-six-1.11.0-8.el8.noarch 1/7
Installing : python3-dateutil-1:2.6.1-6.el8.noarch 2/7
Installing : dbus-glib-0.110-2.el8.x86_64 3/7
Running scriptlet: dbus-glib-0.110-2.el8.x86_64 3/7
Installing : python3-dbus-1.2.4-15.el8.x86_64 4/7
Installing : python3-dnf-plugins-core-4.0.21-3.el8.noarch 5/7
Installing : dnf-plugins-core-4.0.21-3.el8.noarch 6/7
Installing : yum-utils-4.0.21-3.el8.noarch 7/7
Running scriptlet: yum-utils-4.0.21-3.el8.noarch 7/7
Verifying : dbus-glib-0.110-2.el8.x86_64 1/7
Verifying : dnf-plugins-core-4.0.21-3.el8.noarch 2/7
Verifying : python3-dateutil-1:2.6.1-6.el8.noarch 3/7
Verifying : python3-dbus-1.2.4-15.el8.x86_64 4/7
Verifying : python3-dnf-plugins-core-4.0.21-3.el8.noarch 5/7
Verifying : python3-six-1.11.0-8.el8.noarch 6/7
Verifying : yum-utils-4.0.21-3.el8.noarch 7/7
Installed:
dbus-glib-0.110-2.el8.x86_64 dnf-plugins-core-4.0.21-3.el8.noarch python3-dateutil-1:2.6.1-6.el8.noarch
python3-dbus-1.2.4-15.el8.x86_64 python3-dnf-plugins-core-4.0.21-3.el8.noarch python3-six-1.11.0-8.el8.noarch
yum-utils-4.0.21-3.el8.noarch
Complete!
[root@1948d8151b92 yum.repos.d]# yum-config-manager --add-repo https://pkg.cloudflare.com/cloudflared.repo
Adding repo from: https://pkg.cloudflare.com/cloudflared.repo
[root@1948d8151b92 yum.repos.d]# yum install cloudflared
cloudflared-stable 1.9 kB/s | 1.3 kB 00:00
Dependencies resolved.
==============================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================
Installing:
cloudflared x86_64 2022.8.0-1 cloudflared-stable 15 M
Transaction Summary
==============================================================================================================================
Install 1 Package
Total download size: 15 M
Installed size: 30 M
Is this ok [y/N]: y
Downloading Packages:
cloudflared-linux-x86_64.rpm 9.6 MB/s | 15 MB 00:01
------------------------------------------------------------------------------------------------------------------------------
Total 9.6 MB/s | 15 MB 00:01
cloudflared-stable 987 B/s | 640 B 00:00
Importing GPG key 0x8CACCBF8:
Userid : "CloudFlare Software Packaging <[email protected]>"
Fingerprint: FBA8 C0EE 6361 7C5E ED69 5C43 254B 391D 8CAC CBF8
From : https://pkg.cloudflare.com/cloudflare-main.gpg
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : cloudflared-2022.8.0-1.x86_64 1/1
Running scriptlet: cloudflared-2022.8.0-1.x86_64 1/1
Verifying : cloudflared-2022.8.0-1.x86_64 1/1
Installed:
cloudflared-2022.8.0-1.x86_64
Complete!
The config-manager just adds the repo
file to /etc/yum.repos.d/cloudflared.repo
.
ybe a walkthrough for non dnf installs.
cat /etc/yum.repos.d/cloudflared.repo
[cloudflared-stable]
name=cloudflared-stable
baseurl=https://pkg.cloudflare.com/cloudflared/rpm
enabled=1
type=rpm
gpgcheck=1
gpgkey=https://pkg.cloudflare.com/cloudflare-main.gpg
yum install cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package cloudflared.x86_64 0:2022.8.0-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Installing:
cloudflared x86_64 2022.8.0-1 cloudflared-stable 15 M
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package
Total size: 15 M
Installed size: 30 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/2/cloudflared-stable/packages/cloudflared-linux-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 8caccbf8: NOKEY
Retrieving key from https://pkg.cloudflare.com/cloudflare-main.gpg
Invalid GPG Key from https://pkg.cloudflare.com/cloudflare-main.gpg: No key found in given key data
rm /var/cache/yum/x86_64/2/cloudflared-stable/packages/cloudflared-linux-x86_64.rpm
rm: remove regular file ‘/var/cache/yum/x86_64/2/cloudflared-stable/packages/cloudflared-linux-x86_64.rpm’? y
[root@ip-172-31-23-98 yum.repos.d]# yum install cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package cloudflared.x86_64 0:2022.8.0-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Installing:
cloudflared x86_64 2022.8.0-1 cloudflared-stable 15 M
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package
Total download size: 15 M
Installed size: 30 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/2/cloudflared-stable/packages/cloudflared-linux-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 8caccbf8: NOKEY ] 0.0 B/s | 12 MB --:--:-- ETA
Public key for cloudflared-linux-x86_64.rpm is not installed
cloudflared-linux-x86_64.rpm | 15 MB 00:00:00
Retrieving key from https://pkg.cloudflare.com/cloudflare-main.gpg
Invalid GPG Key from https://pkg.cloudflare.com/cloudflare-main.gpg: No key found in given key data
Invalid GPG key and no public key.
OK so this is the same OS that the previous install just worked. the OS is: Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type (ami-0d729d2846a86a9e7) no DNF.
This is a brand new infrastructure stack that's just spun up and a simple download of the cloudflare.repo then a yum install doesn't work. I expect this just to work seamlessly with yum and it doesn't.
I already have several times.
Ansible
- name: Add the cloudflared rpm from their remote repo
command: yum-config-manager --add-repo https://pkg.cloudflare.com/cloudflared.repo
- name: install cloudflared rpm
package:
name:
- cloudflared
null_resource.run_ansible_ec2_install_software (local-exec): TASK [cloudflared : Add the cloudflared rpm from their remote repo] ************
null_resource.run_ansible_ec2_install_software (local-exec): changed: []
null_resource.run_ansible_ec2_install_software (local-exec): TASK [cloudflared : install cloudflared rpm] ***********************************
null_resource.run_ansible_ec2_install_software: Still creating... [50s elapsed]
null_resource.run_ansible_ec2_install_software (local-exec): fatal: []: FAILED! => changed=false
null_resource.run_ansible_ec2_install_software (local-exec): changes:
null_resource.run_ansible_ec2_install_software (local-exec): installed:
null_resource.run_ansible_ec2_install_software (local-exec): - cloudflared
null_resource.run_ansible_ec2_install_software (local-exec): msg: |-
null_resource.run_ansible_ec2_install_software (local-exec): warning: /var/cache/yum/x86_64/2/cloudflared-stable/packages/cloudflared-linux-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 8caccbf8: NOKEY
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): Invalid GPG Key from https://pkg.cloudflare.com/cloudflare-main.gpg: No key found in given key data
null_resource.run_ansible_ec2_install_software (local-exec): rc: 1
null_resource.run_ansible_ec2_install_software (local-exec): results:
null_resource.run_ansible_ec2_install_software (local-exec): - |-
null_resource.run_ansible_ec2_install_software (local-exec): Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
null_resource.run_ansible_ec2_install_software (local-exec): Resolving Dependencies
null_resource.run_ansible_ec2_install_software (local-exec): --> Running transaction check
null_resource.run_ansible_ec2_install_software (local-exec): ---> Package cloudflared.x86_64 0:2022.8.0-1 will be installed
null_resource.run_ansible_ec2_install_software (local-exec): --> Finished Dependency Resolution
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): Dependencies Resolved
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): ================================================================================
null_resource.run_ansible_ec2_install_software (local-exec): Package Arch Version Repository Size
null_resource.run_ansible_ec2_install_software (local-exec): ================================================================================
null_resource.run_ansible_ec2_install_software (local-exec): Installing:
null_resource.run_ansible_ec2_install_software (local-exec): cloudflared x86_64 2022.8.0-1 cloudflared-stable 15 M
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): Transaction Summary
null_resource.run_ansible_ec2_install_software (local-exec): ================================================================================
null_resource.run_ansible_ec2_install_software (local-exec): Install 1 Package
null_resource.run_ansible_ec2_install_software (local-exec):
null_resource.run_ansible_ec2_install_software (local-exec): Total size: 15 M
null_resource.run_ansible_ec2_install_software (local-exec): Installed size: 30 M
null_resource.run_ansible_ec2_install_software (local-exec): Downloading packages:
null_resource.run_ansible_ec2_install_software (local-exec): Retrieving key from https://pkg.cloudflare.com/cloudflare-main.gpg
Doing the same commands manually:
yum-config-manager --add-repo https://pkg.cloudflare.com/cloudflared.repo
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
adding repo from: https://pkg.cloudflare.com/cloudflared.repo
grabbing file https://pkg.cloudflare.com/cloudflared.repo to /etc/yum.repos.d/cloudflared.repo
repo saved to /etc/yum.repos.d/cloudflared.repo
[root@ip-172-31-23-98 yum.repos.d]# yum install cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
cloudflared-stable | 2.9 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package cloudflared.x86_64 0:2022.8.0-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Installing:
cloudflared x86_64 2022.8.0-1 cloudflared-stable 15 M
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package
Total size: 15 M
Installed size: 30 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/2/cloudflared-stable/packages/cloudflared-linux-x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 8caccbf8: NOKEY
Retrieving key from https://pkg.cloudflare.com/cloudflare-main.gpg
Invalid GPG Key from https://pkg.cloudflare.com/cloudflare-main.gpg: No key found in given key data
The solution is rather simple once I understood how amazonlinux's verifier differs from RHEL and other CENTOS ones. It doesn't parse the binary that is cloudflare-main.gpg
. If you replace it with cloudflare-ascii-pubkey.gpg
, this should work: https://pkg.cloudflare.com/#Amazon-Linux
The solution is rather simple once I understood how amazonlinux's verifier differs from RHEL and other CENTOS ones. It doesn't parse the binary that is
cloudflare-main.gpg
. If you replace it withcloudflare-ascii-pubkey.gpg
, this should work: https://pkg.cloudflare.com/#Amazon-Linux
That worked for installing and no errors for a yum update (as no updates to be found)
null_resource.run_ansible_ec2_install_software (local-exec): TASK [cloudflared : Add Amazon Linux cloudflared rpm from their remote repo] ***
null_resource.run_ansible_ec2_install_software (local-exec): changed: []
null_resource.run_ansible_ec2_install_software (local-exec): TASK [cloudflared : install cloudflared rpm] ***********************************
yum info cloudflared
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Installed Packages
Name : cloudflared
Arch : x86_64
Version : 2022.8.0
Release : 1
Size : 30 M
Repo : installed
From repo : cloudflared-stable
Summary : Cloudflare Tunnel daemon
URL : https://github.com/cloudflare/cloudflared
License : Apache License Version 2.0
Description : Cloudflare Tunnel daemon
yum update cloudflared --verbose
Loading "extras_suggestions" plugin
Loading "langpacks" plugin
Loading "priorities" plugin
Loading "update-motd" plugin
Adding en_US to language list
Config time: 0.558
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
pkgsack time: 1.084
Building updates object
up:Obs Init time: 0.173
up:simple updates time: 0.009
up:obs time: 0.002
up:condense time: 0.000
updates time: 0.201
No packages marked for update
I was having an issue updating
cloudflared
using apt on Ubuntu Focal.Reading package lists... Done E: The repository 'https://pkg.cloudflare.com focal Release' no longer has a Release file.
To fix it, I had to edit
/etc/apt/sources.list.d/cloudflare-main.list
and change the file to read as follows:deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared focal main
Where previously the url referenced was just https://pkg.cloudflare.com and didn't have the
/cloudflared
part.
I hate to dig this up; but this fixed my issues that google led me with here. This needs made more prominent/addressed.
Thank you for this!
It’s on the pkg.cloudflare.com landing page and our developer documentation as well now!
It’s on the pkg.cloudflare.com landing page and our developer documentation as well now!
Well, thats an amazing response; can't ask for much more! Thank you, both of you @dpuleri && @sudarshan-reddy
Thank you! (In other news it seems this release of cloudflared is working good/as expected!)
Still dosen't work for me Err:7 https://pkg.cloudflare.com/cloudflared bullseye InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 254B391D8CACCBF8 Hit:8 https://packagecloud.io/crowdsec/crowdsec/debian bullseye InRelease Reading package lists... Done W: GPG error: https://pkg.cloudflare.com/cloudflared bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 254B391D8CACCBF8 E: The repository 'https://pkg.cloudflare.com/cloudflared bullseye InRelease' is not signed.
I deleted the /etc/apt/sources.list.d/cloudflared.list I deleted the /usr/share/keyrings/cloudflare-main.gpg I did apt update and did the exact procedure for bullseye on the pkg.cloudflare.com And it did the error above
What environment are you trying this on?