/cloudflared-freebsd

A basic rc.d script and setup instructions for installing cloudflared on FreeBSD (12).

Primary LanguageShellGNU Affero General Public License v3.0AGPL-3.0

cloudflared on FreeBSD

Installation

  1. Set up Portsnap on FreeBSD.
portsnap fetch
portsnap extract
  1. Install the cloudflared port:
cd /usr/ports/net/cloudflared/ && make install clean
  1. Authenticate cloudflared:
cloudflared tunnel login

The cert.pem file should be moved to where cloudflared can find it e.g. /usr/local/etc/cloudflared

  1. Create /usr/local/etc/cloudflared/config.yml
logfile: /var/log/cloudflared/cloudflared.log
url: ssh://localhost:22
hostname: ssh.example.com
  1. Copy the rc.d file to /usr/local/etc/rc.d
  2. Add cloudflared_enable=YES to /etc/rc.conf
  3. Optionally, set up short-lived certificates.