Open Source & Self-Hosted

Your localhost.
Now everywhere.

Expose local services to the internet with secure tunnels. Self-hosted, blazing fast, built in Rust. The open source alternative to ngrok you've been waiting for.

terminal
$ cargo install betrok
✓ Installed betrok-server & betrok-client
$ betrok-client --port 3000 --subdomain myapp
✓ Tunnel created
https://myapp.betrok.applocalhost:3000
Features

Everything you need.
Nothing you don't.

Betrok gives you powerful tunneling capabilities without the complexity. Self-hosted, open source, and built for developers.

HTTP/HTTPS Tunneling

Expose local web servers with custom subdomains. Get a public URL for your localhost in seconds.

TCP Tunneling

Forward any TCP-based service — SSH, databases, game servers, and more through secure tunnels.

WebSocket Protocol

Built on WebSocket for superior firewall compatibility and lower latency than raw TCP connections.

Authentication

API key-based authentication ensures only authorized clients can create tunnels on your server.

Self-Hosted

Run your own tunnel server. Full control over your infrastructure, data, and configuration.

Auto-Reconnection

Resilient connection handling with automatic reconnection. Your tunnels stay up even on flaky networks.

Web Dashboard

Monitor active tunnels, view connection stats, and manage everything through a built-in web interface.

Secure by Default

All communications encrypted over WebSocket. No exposed ports, no attack surface for your origin servers.

Built in Rust

Memory-safe, blazing fast, and incredibly efficient. Minimal resource usage with maximum performance.

How It Works

Three steps.
That's it.

01

Install Betrok

Download the CLI or desktop app. A single binary with zero dependencies — runs anywhere Rust compiles.

Install|cargo install betrok
02

Start Your Server

Deploy the betrok-server on your public-facing machine. It handles incoming connections and routes traffic.

Server|betrok-server --bind 0.0.0.0 --http-port 8080
03

Create a Tunnel

Point the client at your local service and get a public URL instantly. Custom subdomains included.

Tunnel|betrok-client --port 3000 --subdomain myapp
Your app is live athttps://myapp.betrok.app
Use Cases

From localhost
to production.

Whether you're demoing, debugging, or deploying — betrok gets your local services in front of the right people.

Share localhost demos

Show your work-in-progress to clients or teammates without deploying. Just share the betrok URL.

Test webhooks locally

Receive webhook callbacks from services like Stripe, GitHub, or Slack directly to your local dev server.

Mobile app development

Test your local API from real mobile devices on any network. No need for same-network restrictions.

Team collaboration

Let your team access your local environment for debugging, code review, or pair programming sessions.

Expose any TCP service

SSH servers, databases, game servers — if it uses TCP, betrok can tunnel it to a public endpoint.

Self-host everything

Run your own tunnel infrastructure. No vendor lock-in, no usage limits, no surprise bills.

Download

Ready to start tunneling?

Download the CLI or desktop app. Free, open source, forever.

macOS users: If you see “betrok is damaged and can't be opened”, run this after installing:

xattr -cr /Applications/betrok.app
or build from source:git clone && cargo build --release