Teitunnel

Export your setup

Take this machine's tunnel and routes to a server, to Docker, or into Terraform.

Routes ▸ Export turns this machine's tunnel and routes into configuration for other tools. Nothing secret is ever included.

FormatWhat it's for
config.ymlThe routes as a cloudflared configuration file: to run them as a locally-managed tunnel, or to keep as a record.
Docker ComposeA cloudflared service that runs this same tunnel in Docker, pinned to the version this machine uses. The run token comes from TUNNEL_TOKEN in a .env file; get it with cloudflared tunnel token <id>.
TerraformThe tunnel, its routes and their DNS records for the Cloudflare provider v5, with import blocks, so terraform plan adopts what already exists instead of recreating it.

Copy the file or save it to Downloads.

After you import the Terraform, Terraform owns those resources: make changes there, not in Teitunnel, or each will undo the other's edits.

In Docker, localhost is the container itself. Point routes at host.docker.internal or at other services' names so they're reachable from the container.

Edit on GitHub