Created
September 4, 2026 08:24
-
-
Save ellcom/ea0053be9a872a1dc96754b222ce670b to your computer and use it in GitHub Desktop.
Install cloudflared on raspberry pi zero
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # done locally for speed, need go installed i.e. brew install go | |
| git clone https://github.com/cloudflare/cloudflared.git | |
| cd cloudflared | |
| COMMIT=$(git rev-parse --short HEAD) | |
| VERSION=$(git describe --tags --abbrev=0) | |
| CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build \ | |
| -ldflags "-X main.Version=$VERSION -X main.BuildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X main.GitCommit=$COMMIT" \ | |
| -o cloudflared ./cmd/cloudflaredVERSION=$(git describe --tags --abbrev=0)VERSION=$(git describe --tags --abbrev=0) | |
| # transfer to pi | |
| scp cloudflared elliot@pi-ip-address:. | |
| # ssh into pi | |
| # put the file in /usr/local/bin/ on the pi | |
| mv cloudflared /usr/local/bin/. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment