Skip to content

Instantly share code, notes, and snippets.

@supersonictw
Last active February 7, 2025 18:35
Show Gist options
  • Save supersonictw/a19ca7eb887f62ef874ef8678da39cb8 to your computer and use it in GitHub Desktop.
Save supersonictw/a19ca7eb887f62ef874ef8678da39cb8 to your computer and use it in GitHub Desktop.
CloudFlared OpenRC for Alpine Linux wget -O - https://ncurl.xyz/s/nUqux-KNg | sh
#!/sbin/openrc-run
# CloudFlared OpenRC for Alpine Linux
# https://github.com/cloudflare/cloudflared
# SPDX-License-Identifier: Apache-2.0
cloudflare_token="YOUR_TOKEN_HERE"
#!/sbin/openrc-run
# CloudFlared OpenRC for Alpine Linux
# https://github.com/cloudflare/cloudflared
# SPDX-License-Identifier: Apache-2.0
name=$(basename $(readlink -f $0))
command="/usr/local/bin/cloudflared"
command_args="--pidfile /var/run/$name.pid --no-autoupdate tunnel run --token $cloudflare_token"
command_user="cloudflared"
command_background="yes"
pidfile="/var/run/$name.pid"
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"
#!/bin/sh
# CloudFlared OpenRC for Alpine Linux
# https://github.com/cloudflare/cloudflared
# SPDX-License-Identifier: Apache-2.0
wget -O "/etc/conf.d/cloudflared" "https://ncurl.xyz/s/vKClxaFNg"
wget -O "/etc/init.d/cloudflared" "https://ncurl.xyz/s/ViFub-KNg"
chown root:root "/etc/conf.d/cloudflared" "/etc/init.d/cloudflared"
chmod +x "/etc/init.d/cloudflared"
addgroup -S cloudflared
adduser -S -H -s "/bin/ash" -h "/dev/null" -g cloudflared -G cloudflared cloudflared
echo "Done."
@supersonictw
Copy link
Author

To install cloudflared

wget -O /usr/local/bin/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
chmod +x /usr/local/bin/cloudflared

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