• Skip to main content

Santiago Garza

Software Engineer

  • Blog
  • Photos
  • Contact
  • Tools
    • Text To Image AI

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.

Raspberry Pi connected to a CAT 6 ethernet cable

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.

Related

Filed Under: Raspberry Pi, Tech Tips, Tutorials

About Santiago

I am a Professional Software Engineer with over a decade of experience. I have a passion for exploring how different technologies can enhance our everyday lives and enjoy sharing this knowledge with others. 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 © 2025 ยท Santiago Garza

 

Loading Comments...