Getting Started
What is MekongTunnel and how to get up and running in under a minute.
Getting Started
MekongTunnel is a self-hosted SSH tunnel server written in Go. It works like ngrok or Cloudflare Tunnel, but you control it.
Run one command and expose any local port to the internet with a public HTTPS URL:
mekong 3000
You get:
- A unique public URL:
https://happy-tiger-a1b2.mekongtunnel.dev - The URL copied to your clipboard automatically
- A QR code printed in your terminal
- Live HTTP request logs streamed to your terminal
- Auto-reconnect if the connection drops
New in v1.4.0+:
- Run in the background:
mekong -d 3000 - Check tunnel status:
mekong status - Stop a background tunnel:
mekong stop 3000
New in v1.4.4:
- Tunnel expiry support with
-eand--expire - Raw SSH can also request expiry
- Tunnel banner/output and
mekong statusnow show expiry - Idle timeout follows the requested expiry
- Older servers now show a clear upgrade message instead of reconnecting forever
New in v1.4.6:
- Daemon management release with
mekong logsandmekong logs -f - Filter daemon logs by local port with
mekong logs 3000andmekong logs -f 3000 - Stop one daemon tunnel with
mekong stop 3000or stop everything withmekong stop --all mekong statusnow supports per-port daemon state and shows PID info for active tunnels- Stopping a tunnel clears old logs for that port, and
mekong stop --allclears the daemon log file
New in v1.4.5:
- Stability and deployment fixes so expiry works correctly in production
- Updated macOS install steps to use
sudo xattr - Added
mekongtunnel versionfor server version checking
Prerequisites
- macOS, Linux, or Windows
- A running local service on any port
That's it. No account. No config file. No dashboard.
Quick start
Step 1 โ Install the CLI
sudo curl -L https://github.com/MuyleangIng/MekongTunnel/releases/download/v1.4.6/mekong-darwin-arm64 -o /usr/local/bin/mekong
sudo chmod +x /usr/local/bin/mekong
sudo xattr -d com.apple.quarantine /usr/local/bin/mekongSee the Installation page for all platforms.
Step 2 โ Start a local server (or use your existing app)
python3 -m http.server 3000Step 3 โ Open a tunnel
mekong 3000 --expire 1wYou'll see the banner with your public URL within seconds. If you want the default lifetime, just run mekong 3000.
What happens under the hood
When you run mekong 3000, the CLI:
- Connects to
mekongtunnel.devover SSH on port 22 - Sends a
tcpip-forwardrequest to ask the server to forward traffic - The server assigns you a memorable subdomain and starts listening
- A public HTTPS URL is displayed in your terminal
- Incoming requests are forwarded to your
localhost:3000via the SSH channel
See How It Works for a full technical walkthrough.
Next steps
- Installation โ all platforms and install methods
- CLI Reference โ all flags and commands
- Self-Hosting โ run your own server
