Skip to main content

Tunnel address changes after a restart

Symptomsโ€‹

  • After you restart tuna http or it reconnects, the console shows a different address.
  • The old address shows the "Tunnel not found" page with a 404 code.
  • Webhooks and payment callbacks stopped arriving, and the link you sent a colleague no longer opens.

Causeโ€‹

Without flags, a tunnel gets a dynamic address like 4l7mqf-212-49-103-2.a.2na.am. It's issued on every start and changes when the tunnel reconnects. This is expected: a dynamic address is meant for a one-off demo or debugging.

Fixโ€‹

Use your free permanent subdomain. Every account has one on any plan, and an address like brave-otter-4821.a.tuna.free stays the same between runs.

  1. Find your subdomain in the dashboard, where it's labeled "Free". tuna also suggests it when you start a tunnel without flags:

    Your permanent free domain: brave-otter-4821.a.tuna.free. Use it with --subdomain=brave-otter-4821
  2. Start the tunnel with it:

    tuna http 8080 --subdomain=brave-otter-4821
  3. Replace the old address wherever you used it: in the provider's webhook settings, in callbacks, in bookmarks.

The subdomain is tied to your account, so tuna has to be signed in to it: tuna login or an API key in TUNA_API_KEY.

A subdomain with a meaningful name, such as billing.a.2na.am, or your own domain requires a subscription. For TCP tunnels, a reserved port gives you a permanent address.

To avoid typing the flag every time, save the command in .tuna.yml or install the tunnel as a service.