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.

Revisions

  1. bkrajendra revised this gist Oct 5, 2025. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions install-cloudflared.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Cloudflared Setup Guide
    # Cloudflared Setup Guide on Raspberry Pi with Home Assistant
    This guide will walk you through setting up Cloudflared on your system.

    ## Pre-Requisites
    @@ -9,7 +9,7 @@ Here are the steps to install Cloudflared.

    ```bash
    # Download the latest version of cloudflared
    wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /usr/bin/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
  2. @sarkrui sarkrui created this gist May 31, 2023.
    55 changes: 55 additions & 0 deletions install-cloudflared.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,55 @@
    # Cloudflared Setup Guide
    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.

    ```bash
    # Download the latest version of cloudflared
    wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -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](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:

    ```bash
    # 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](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation) for further help.