SubTunnel

Expose localhost to
the internet

Self-hosted tunnels on your own domain. One binary, MIT licensed.

subtunnel · zsh

$ subtunnel local 3000 --to tunnel.example.com:7835 \

--token TOKEN --subdomain myapp

Forwarding https://myapp.tunnel.example.com -> localhost:3000

Install

curl -sSL https://www.subtunnel.dev/install.sh | sh

macOS and Linux. Or download the binary from GitHub Releases.

Self-hosted

Runs on your own VPS. Your traffic never touches a third party.

Wildcard + custom domains

Every tunnel gets a subdomain on your domain, or bring any domain you own.

TLS via nginx + Let's Encrypt

HTTPS with tooling you already trust. No proprietary edge.

Token-based auth

Only clients holding your token can open a tunnel.

Single static binary

Written in Rust. No runtime, no dependencies to install.

MIT open source

Read the code. Fork it. It's yours.

Self-host

Self-host in 3 steps

Read the full guide
  1. 01

    Point DNS

    Point a wildcard A record for *.tunnel.example.com to your server.

  2. 02

    Run the server

    Install SubTunnel and run subtunnel server on the VPS.

  3. 03

    Connect

    Run subtunnel local from your machine.