Skip to content

Instantly share code, notes, and snippets.

@Zoobdude
Last active August 12, 2022 13:07
Show Gist options
  • Save Zoobdude/55be8e623eee3151feaecb0d07049061 to your computer and use it in GitHub Desktop.
Save Zoobdude/55be8e623eee3151feaecb0d07049061 to your computer and use it in GitHub Desktop.
How to setup cloudflare tunnels on a pi

Prerequisites

Installing Raspberry pi OS

Download the imager from here Install the imager

Finding the pi's IP

In CMD run

ping raspberrypi

Then

ssh pi@IP

Making sure to set IP to the IP of the pi, from the last step

Updating the pi

sudo apt update
sudo apt upgrade

Installing cloudlare tunnels

64 bit pis

$ wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb
$ sudo dkpg -i cloudflared-linux-arm64.deb

32 bit pis

wget *INSERT MOST RECENT RELEASE FROM https://hobin.ca/cloudflared/*
tar -xvzf cloudflared-stable-linux-arm.tgz
sudo cp ./cloudflared /usr/local/bin
sudo chmod +x /usr/local/bin/cloudflared

Now Check it has installed correctly

cloudflared -v

if the output is similar to cloudflared version 2022.7.1 (built 2022-07-07-0625 UTC) it has worked

Setting up the tunnel

go to https://dash.teams.cloudflare.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment