tunnelctl
CLI

up

Start or attach a tunnel that forwards a public hostname to a local service.

tunnelctl up reserves a slug (if needed), issues/loads a connection token, and starts forwarding <slug>.tunnelctl.eu to a local target.

tunnelctl up <slug> [target] [flags]

By default it runs in the foreground and streams output; Ctrl+C shuts the tunnel down cleanly. It is idempotent — running up for a slug that's already running attaches to it rather than starting a duplicate.

Examples

tunnelctl up myapp 8080            # forward to 127.0.0.1:8080, foreground
tunnelctl up myapp 8080 -d         # run as a background daemon
tunnelctl up myapp                 # reuse the target saved from last time
tunnelctl up api localhost:5173    # host:port target
tunnelctl up api http://localhost:3000

Target formats

The optional target argument accepts:

FormResolves to
5173127.0.0.1:5173
localhost:5173, [::1]:5173, 192.168.1.5:8080as written
http://localhost:3000, https://api.example:8443host:port from the URL

Omit target to reuse the last target stored for that slug.

Flags

FlagDefaultDescription
-d, --detachoffRun as a background daemon; the command returns immediately.
--host-header-rewrite <value>Rewrite the outgoing HTTP Host header (e.g. localhost) so virtual-hosted local apps route correctly.
--pool-count <n>5Pre-allocate N work connections (1–50) for lower first-byte latency under load.

Single runner per slug

A slug can only be actively served from one place at a time. Starting it elsewhere uses a newer connection token, which the server validates by serial — the older session is dropped.

On this page