Installing cloudflared
cloudflared is one self-contained binary. There is no runtime to install first, no service that appears by itself, and nothing phones home until you run a command that talks to Cloudflare. This guide's lab used the plainest route of all: download the binary from Cloudflare's GitHub releases, mark it executable, run it where it stands. Package managers and installers exist for every platform and end at the same binary; they are listed below and labelled documented-only where the lab did not use them.
The binary, as the lab did it
For 64-bit Linux:
curl -L -o cloudflared \
https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
chmod +x cloudflared
./cloudflared --version
Check: the lab's printout (transcript
cloudflared-lab/transcripts/t00-version-and-help.txt):
$ cloudflared --version
cloudflared version 2026.10.5 (built 2026-10-27-13:25 UTC)
The version is a date, not a sequence —
cloudflared releases are named for when
they were cut, and they arrive often.
Advice written for one version travels
well to the next; the subcommands and the
config format change slowly, and the
--help text on your binary is the
authority for your binary. The same
transcript keeps the top-level help and
the tunnel subcommand's help, which
between them list everything this guide
uses.
On a machine you keep, move the binary
somewhere on the path (/usr/local/bin/
is the usual place) so later chapters can
say cloudflared without the ./. The
lab deliberately did not: it ran the
binary from a scratch folder, because a
lab should leave the machine as it found
it. On your machine, putting it on the
path is the right call.
The other routes (documented)
Cloudflare publishes the same program as
a Debian and RPM package (through its own
package repository, pkg.cloudflare.com),
a Docker image (cloudflare/cloudflared),
a Homebrew formula for macOS, and
installers for Windows, alongside release
binaries for other CPU architectures —
the ARM build is the one a Raspberry Pi
wants. All documented-only in this guide;
whichever you choose, the check is the
same: cloudflared --version answers.
Where its state lives
cloudflared keeps everything it owns in one folder per context:
~/.cloudflared/for the tunnels you run as yourself: thecert.pemfrom login (chapter 5), each tunnel's credentials file, and yourconfig.yml./etc/cloudflared/for the system service of chapter 7, with the same contents in the same shapes.
Nothing exists in either place yet. The
folder is created by the first command
that needs it — login, in practice. The
lab's machine confirms the starting state
in transcript
cloudflared-lab/transcripts/t06-named-tunnel-no-account.txt,
where every account-bound command fails
for the same stated reason: there is no
cert.pem in any of the places
cloudflared looks, and it lists the
places. That list is worth remembering;
it is the map of where cloudflared
expects to be living.
Updates
A standalone binary does not update
itself silently. cloudflared update
fetches and installs a newer release, and
runs made for real work accept
--no-autoupdate to promise the version
will not change underneath a running
tunnel (the Debian package, naturally, is
updated by apt like anything else). This
guide's transcripts pass --no-autoupdate
on every run — a record of an experiment
should not depend on which week it is
re-run.