Skip to content
TurbotunnelTurbotunnel
Esc
navigateopen⌘Jpreview
On this page

tt deploy

Provision and configure your Turbotunnel gateway on Vercel.

tt deploy [options]

tt deploy provisions a gateway in your Vercel account and saves verified connection settings. It preserves the previous local configuration if deployment or verification fails. See Configure your gateway for the saved settings.

The command prepares a local gateway workspace, links a Vercel project, sets production environment variables, deploys, and verifies the public status endpoint.

Deployment options

Use these options to select the Vercel project, public domain, and Queue region:

Option Description Default
--project <name> Vercel project name. Without --domain, the name must use the <slug>-turbotunnel form. Generated <slug>-turbotunnel
--domain <domain> Base tunnel domain or a host pattern containing {slug}. {slug}-turbotunnel.vercel.app
--region <region> Vercel Queue region. iad1
--format json Print the final result as JSON. No other format is accepted. Terminal output

Running the command again without options reuses the saved project, slug, domain, region, and relay secret.

Default Vercel domain

Run the command without options to use a generated project and Vercel domain:

tt deploy

A generated deployment slug such as ttdemo12 produces the project ttdemo12-turbotunnel and gateway URL:

https://ttdemo12-turbotunnel.vercel.app/

The deployment slug identifies the Vercel gateway project and its initial hostname. Repository projects can attach exact managed vercel.app hostnames or verified custom domains to that gateway project.

Custom domains

Pass a base domain to create a wildcard gateway domain:

tt deploy --domain tunnel.example.com

A tunnel with the slug demo is available at https://demo.tunnel.example.com/. Turbotunnel asks Vercel to add *.tunnel.example.com to the project.

Use {slug} to place the deployment slug in one concrete hostname:

tt deploy --project demo-turbotunnel --domain "{slug}.dev.example.com"

This adds demo.dev.example.com to the Vercel project. Here, {slug} resolves from demo-turbotunnel to demo. For other project names, Turbotunnel reuses the saved deployment slug or generates one.

This form does not add a wildcard. Use a base domain such as dev.example.com when you need arbitrary runtime slugs.

Your domain must already be available to the active Vercel account. Vercel may ask you to configure DNS or prove ownership.

JSON output

Pass --format json to send the final result to stdout:

tt deploy --format json

A successful deployment writes progress to stderr and one JSON result to stdout:

{
  "status": "success",
  "reason": "gateway_deployed",
  "data": {
    "gatewayUrl": "https://ttabc123-turbotunnel.vercel.app/",
    "deploymentUrl": "https://ttabc123-turbotunnel.vercel.app/",
    "project": "ttabc123-turbotunnel",
    "tunnelDomain": "{slug}-turbotunnel.vercel.app",
    "queueRegion": "iad1",
    "configPath": "/Users/you/.turbotunnel/config.json"
  },
  "next": [{ "command": "tt http", "argv": ["tt", "http"] }]
}

Expected failures in JSON mode use stdout and exit with status 1. A project name without --domain must end in -turbotunnel. The response includes "error" status, the CliConfigError reason, and a recovery message.

An unsupported --format value cannot select JSON mode, so that configuration error is printed as terminal text on stderr.

Was this page helpful?