• Skip to main content

Santiago Garza

Software Developer

  • Blog
  • Photos
  • Contact

How To Install Cloudflare Tunnel On A Raspberry Pi

April 28, 2021 by Santiago Leave a Comment

Cloudflare Tunnel, is a service that allows you to securely turn any network connected device into a public server. This tutorial will show you how to install the Cloudflare tunnel utility known as cloudflared on a Raspberry Pi.

Photo by Gavin Allanwood on Unsplash

Why Use Cloudflare Tunnel?

Maybe you want to demo the latest web app you are building or maybe your latest project an IoT robot that can be accessed from anywhere in the world. Cloudflare tunnel lets you do all of this without having to set up port forwarding & firewall rules on your devices and your router, instead you simply lockdown your firewall and then configure and run the cloudflared utility so that only inbound web traffic over Cloudflare’s network ever reaches your device.

Installation Process

To install the cloudflared utility on a raspberry pi open up a terminal and run the following commands.

wget -q https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz
tar -xvzf cloudflared-stable-linux-arm.tgz
sudo cp cloudflared /usr/local/bin/
sudo chmod +x /usr/local/bin/cloudflared
rm cloudflared cloudflared-stable-linux-arm.tgz

Finally to connect the utility to your cloudflare account, run:

cloudflared tunnel login
Cloudflared Login Prompt
Auth page shown when you follow the link in the prompt
Authorization Successful
Login Complete

As shown above you will be prompted to visit a url, log in to your Cloudflare account, and select a domain to use for your tunnel.

Filed Under: Raspberry Pi, Tech Tips, Tutorials

About Santiago

I am a Professional Software Developer and Lead Backend Developer at imFORZA. I have a passion for learning about how different technologies can help us in our everyday lives and sharing that information with the people around me. Learn more about me, or get in touch through my contact form.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • GitHub
  • WordPress
  • Twitter
  • Instagram
  • LinkedIn

Copyright © 2022 ยท Santiago Garza