On this page
Getting started
Ten minutes from install to a team inbox that every developer listens to. Examples use the hosted server at
tunnex.org; for your own server add --server wss://connect.example.com to tunnex login once
(self-hosting).
1. Install
pip install tunnex # Python 3.10–3.13; or: pipx install tunnex · uvx tunnex …
tunnex --version
In containers use the image registry.gitlab.com/homycoder/tunnex/client (examples).
2. A tunnel (no account needed)
tunnex http 3000
You get a public HTTPS URL for localhost:3000, and every request is recorded in the local inspector at
http://127.0.0.1:4040, where you can read and replay it. WebSockets, server-sent events and large uploads
stream end to end. Anonymous tunnels get a random subdomain and show browsers a warning page first.
3. Sign in
tunnex login # opens the browser; approve the code shown in the terminal
tunnex whoami
With an account you can pick subdomains (tunnex http 3000 -s acme-preview), open TCP tunnels
(tunnex tcp 5432), protect tunnels at the edge (--basic-auth, --key auto, --allow-ip,
--allow-email @example.com) and use team inboxes.
4. A team inbox
tunnex teams create acme
tunnex inboxes create acme-stripe --team acme --provider stripe --secret whsec_...
In the Stripe dashboard (Developers → Webhooks → Add endpoint), set the URL to
https://acme-stripe.tunnex.org/webhooks/stripe and copy its signing secret into --secret (or
tunnex inboxes update acme-stripe --secret ... later). From now on the URL never changes.
Every developer runs:
tunnex listen acme-stripe --forward 3000
Each listener gets every event, at http://localhost:3000/webhooks/stripe, with the original headers — so your
handler verifies the Stripe signature as usual. Events that arrived while a laptop was closed are delivered when
it reconnects. Send a test event from Stripe, then:
tunnex inboxes events acme-stripe # what arrived, signature status, deliveries
tunnex inboxes replay acme-stripe <id> # again, re-signed so verification still passes
Filters keep a listener to the events it cares about:
tunnex listen acme-stripe --forward 3000 --filter json.type=checkout.session.completed.
Everything else about inboxes: Inboxes.
5. Invite the team
tunnex teams invite acme --role member # prints a one-time link valid for 7 days
They open the link (or run tunnex teams join <link>) and can listen right away. Admins manage inboxes and
invites; owners manage roles. The console at https://connect.tunnex.org shows inboxes, events, deliveries,
listeners, members and the audit log.
6. Staging and CI
Give machines their own, narrow token:
tunnex tokens create staging --scope listen --expires-in 90 # shown once: store it as TUNNEX_TOKEN
and describe what they run in a tunnex.yaml:
listeners:
stripe: {inbox: acme-stripe, forward: "http://app:3000", name: staging}
docker run --rm --network <your-app-network> -e TUNNEX_TOKEN -v "$PWD/tunnex.yaml:/etc/tunnex/tunnex.yaml:ro" \
registry.gitlab.com/homycoder/tunnex/client # runs `tunnex start` with that file
Templates for Docker Compose, Kubernetes, GitLab CI and GitHub Actions are in examples/.
7. Let your coding agent drive it
claude mcp add -s user tunnex -- uvx tunnex mcp serve
The agent can start tunnels and listeners, wait for the next webhook, read it and replay it after fixing the
handler. Cursor and other MCP clients: command uvx, args ["tunnex", "mcp", "serve"].
Next
Configuration · Self-hosting · API · Security · Architecture