cloudflare

Cloudflare tunnel and DNS configuration.

Use it on boxctl

  1. On the dashboard, pick cloudflare in the Template picker and click Boot box.
  2. The box boots, then runs cloudflare/tunnel.sh on itself. The button reads Booting… until the script has finished.
  3. Open the box's Terminal and follow the guide below. The box's row keeps a link back to this page under the template's name.

The guide is shared with the onctl CLI, so it starts from an onctl up -a cloudflare/tunnel.sh command. Booting a box with this template replaces that command; everything the guide runs on the VM itself applies as written.

Options

This template needs CF_TOKEN, and boxctl cannot pass options to a template yet. Booted from the dashboard, its script runs without it.

OptionRequiredWhat it sets
CF_TOKENYesCloudflare Tunnel token.

Cloudflare

Environment Variables

  • CF_TOKEN: The Cloudflare Tunnel token

Install cloudflared and create a tunnel for the domain

onctl ssh cf-tunnel \
    -a cloudflare/tunnel.sh \
    -e CF_TOKEN=eyXXXX

See the template's source for exactly what it runs.