tnl.dev :: docs

publish an app.

Give an already-running local HTTP app an HTTPS URL.

publish a running app

Start your local HTTP app first, then publish its port:

tnl publish 3000

Sign in when prompted. Leave tnl publish running to serve visitors; Ctrl+C stops the tunnel, not your app. You can also pass a loopback HTTP target such as http://127.0.0.1:3000. For an app you want tnl to start, use tnl dev.

For scripts, tnl publish 3000 --output=ndjson writes lifecycle events to stdout; see automation.

who can visit?

Allow a visitor for this run with --allow-ip:

tnl publish 3000 --allow-ip 198.51.100.10

Replace the example with the visitor's public IP. For persistent IP addresses, CIDRs, and access defaults, see who can visit?.

To receive Stripe or GitHub webhooks, select the provider's published webhook IP list:

tnl publish 3000 --allow-provider stripe --allow-provider github

You can combine --allow-provider with --allow-ip. tnl adds your current IP as well and fetches provider lists when publishing starts; restart the tunnel to refresh them. The policy applies to the whole hostname. Verify webhook signatures in your app.

keep or remove a public url

Normally the public URL remains saved when the tunnel stops and can be published again. Use --ephemeral to remove it after this tunnel stops:

tnl publish 3000 --ephemeral

To remove a saved public URL, run tnl url list to get its ID, then tnl url delete <public-url-id>.

publish without project configuration

tnl publish works without a project file. In a configured project, tnl publish api uses the named service's publish.target; a port or local HTTP URL argument uses that target directly. Use the root --no-config flag to skip project configuration entirely:

tnl --no-config publish 3000

See project configuration and the config reference for saved defaults.