this super quick n dirty list will download and install go, set the path for go, clone the cloudflared git repository and compiles cloudflared to finally move it into /usr/local/bin

this is just required for the raspberry pi zero, for the rpi 3 and up the binaries provided by Cloudflare work out of the box.

please adapt the first 2 lines with the version you actually want to install. The cloudflared tags can be found here and the current go version here.

export CLOUDFLARED_VERSION="2021.5.10"
export GOVERSION="1.16.4"
export ARCH="armv6l"

curl -SLsf$GOVERSION.linux-$ARCH.tar.gz --output /tmp/go.tgz
sudo rm -rf /usr/local/go/
sudo mkdir -p /usr/local/go/
sudo tar -xvf /tmp/go.tgz -C /usr/local/go/ --strip-components=1

export GOOS=linux
export GOARCH=arm
export GOARM=6
export CGO_ENABLED=1
export CC=gcc
export GOPATH=$HOME/go/
export PATH=$PATH:/usr/local/go/bin/

git clone
cd cloudflared
git checkout tags/$CLOUDFLARED_VERSION
make cloudflared
sudo mv cloudflared /usr/local/bin/