Skip to content

Instantly share code, notes, and snippets.

@bkrajendra
Forked from sarkrui/install-cloudflared.md
Last active October 5, 2025 18:07
Show Gist options
  • Select an option

  • Save bkrajendra/faaaf809b12aeb0cf5990e3eb4a103eb to your computer and use it in GitHub Desktop.

Select an option

Save bkrajendra/faaaf809b12aeb0cf5990e3eb4a103eb to your computer and use it in GitHub Desktop.
Install Cloudflared on Alpine Linux

Cloudflared Setup Guide on Raspberry Pi with Home Assistant

This guide will walk you through setting up Cloudflared on your system.

Pre-Requisites

You need to have administrative (sudo) access to your system.

Here are the steps to install Cloudflared.

# Download the latest version of cloudflared
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64 -O /usr/bin/cloudflared

# Give executable permissions to the downloaded file
chmod +x /usr/bin/cloudflared

# Check the version of cloudflared to confirm the installation
cloudflared -v

Creating a Cloudflare Tunnel

After installing Cloudflared, you need to create a Cloudflare tunnel.

  1. Visit https://one.dash.cloudflare.com.
  2. Navigate to Access -> Tunnels -> Create a tunnel.
  3. Fill in a name you like and save the tunnel.
  4. Find the code block below If you already have cloudflared installed on your machine.

Starting the Cloudflared Service

To start the Cloudflared service on your machine, follow the steps below:

# Start the service
/etc/init.d/cloudflared start

# Remove the service from the default runlevel (just in case it was added earlier)
rc-update del cloudflared

# Add the service to the runlevel again (this ensures that the service starts automatically when the system boots)
rc-update add cloudflared

# Start the service immediately
rc-service cloudflared start

# Add the service to the default runlevel
rc-update add cloudflared default

That's it! You have successfully installed and set up Cloudflared on your system.

Troubleshooting

If you encounter any issues while following this guide, please check the official Cloudflared documentation for further help.

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