tunnelctl
Concepts

Tunnels & slugs

The tunnel reservation model — slugs, ownership, target, and lifecycle state.

A tunnel is a reservation that maps a public hostname to a local service. It is owned by the user who created it and identified by a slug.

Slugs

The slug is the subdomain of your public URL: slug myappmyapp.tunnelctl.eu. Slugs are DNS-safe and globally unique:

  • 3–32 characters
  • lowercase letters, digits, and hyphens (a-z, 0-9, -)
  • must start and end with a letter or digit

What a tunnel holds

FieldMeaning
slugPublic subdomain / identifier
ownerThe SSO subject + email of the creator
targetPortThe local port traffic is forwarded to
enabledWhether the tunnel accepts connections
stateLifecycle state (below)
connection token serialMonotonic counter used to invalidate old sessions

Lifecycle state

A tunnel moves through a small state machine on the server:

StateMeaning
ReservedCreated, but no FRP client has connected yet (short TTL).
ActiveAn FRP client is connected and forwarding traffic.
InactiveThe client disconnected; a grace period runs before cleanup.
DisabledExplicitly paused by an admin; new connections are rejected.

Automatic cleanup

Reserved tunnels that never activate, and Inactive tunnels that never reconnect, are swept after a TTL. Active and Disabled tunnels are never auto-removed — they reflect explicit intent.

Reconciliation-friendly by design

Tunnel reservations are managed through idempotent operations: creating a tunnel with the same desired spec twice converges to the same state, and deletes are idempotent too. This makes the API safe to drive from scripts, CLIs that retry, and IaC tooling. See Server & admin → API.

On this page