Skip to content

Instantly share code, notes, and snippets.

@sarkrui
Created October 31, 2023 13:37
Show Gist options
  • Save sarkrui/349eae4707ac318a3db697ddbc012b91 to your computer and use it in GitHub Desktop.
Save sarkrui/349eae4707ac318a3db697ddbc012b91 to your computer and use it in GitHub Desktop.
Install cloudflared
#!/bin/bash
# Identify the operating system and architecture
OS=$(uname -s)
ARCH=$(uname -m)
# Install based on system distribution
if [ "$OS" == "Linux" ]; then
if [ "$ARCH" == "x86_64" ]; then
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
dpkg -i cloudflared.deb
elif [ "$ARCH" == "aarch64" ]; then
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb
dpkg -i cloudflared.deb
else
echo "Unsupported architecture."
exit 1
fi
elif [ "$OS" == "Darwin" ]; then
brew install cloudflare/cloudflare/cloudflared
else
echo "Unsupported operating system."
exit 1
fi
@sarkrui
Copy link
Author

sarkrui commented Oct 31, 2023

One-click Installation

bash -c "$(curl -fsSL https://tinyurl.com/installCloudflared)"

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