Real projects are never one port. The frontend runs on 3000, the API on 8080, Postgres on 5432. When a teammate or webhook provider needs access, exposing them one at a time gets old fast.
21tunnel's answer is a single config file. Drop a mytunnel.toml
beside your project:
[[tunnels]]
kind = "http"
port = 3000
subdomain = "web"
[[tunnels]]
kind = "http"
port = 8080
subdomain = "api"
[[tunnels]]
kind = "tcp"
port = 5432
Then one command, mytunnel start, runs everything in parallel — each tunnel in its own multiplexed session, each with its own
stable URL. web.21tunnel.com for the frontend, api.21tunnel.com for the backend, a TCP endpoint for the database.
Why this matters in practice:
Stable URLs across restarts mean webhook configs, demo links,
and MCP client settings never go stale. One file in version
control means every teammate gets the identical setup by cloning
the repo. And when an AI coding agent drives the environment, the
same file plus a scoped child key means the agent can bring the
whole stack online without ever holding your account credentials.
Search order is flexible: --tunnels-config FILE wins, then
./mytunnel.toml, then ~/.config/mytunnel/tunnels.toml for global
defaults.
Full reference, headers, global flags, and the CI-friendly token
options: 21tunnel-docs
Responses
Join the conversation
Sign in to share your thoughts and interact with the author.
Sign In to Comment