Mekong Tunnel Logo
MEKONG

Installation

Install the mekong CLI on macOS, Linux, or Windows.

Installation

The mekong CLI is the easiest way to use MekongTunnel. It handles SSH connections, auto-reconnect, QR code display, and clipboard copying automatically.

macOS โ€” Apple Silicon (M1, M2, M3, M4)

sudo curl -L https://github.com/MuyleangIng/MekongTunnel/releases/download/v1.4.9/mekong-darwin-arm64 -o /usr/local/bin/mekong
sudo chmod +x /usr/local/bin/mekong
sudo xattr -d com.apple.quarantine /usr/local/bin/mekong
mekong 3000

macOS โ€” Intel

sudo curl -L https://github.com/MuyleangIng/MekongTunnel/releases/download/v1.4.9/mekong-darwin-amd64 -o /usr/local/bin/mekong
sudo chmod +x /usr/local/bin/mekong
sudo xattr -d com.apple.quarantine /usr/local/bin/mekong
mekong 3000
โ„น๏ธ

The xattr line removes macOS Gatekeeper quarantine so the binary runs without a security warning. It's safe to skip if you build from source.

Linux โ€” amd64

sudo curl -L https://github.com/MuyleangIng/MekongTunnel/releases/download/v1.4.9/mekong-linux-amd64 -o /usr/local/bin/mekong
sudo chmod +x /usr/local/bin/mekong
mekong 3000

Linux โ€” arm64

sudo curl -L https://github.com/MuyleangIng/MekongTunnel/releases/download/v1.4.9/mekong-linux-arm64 -o /usr/local/bin/mekong
sudo chmod +x /usr/local/bin/mekong
mekong 3000

Windows

  1. Download mekong-windows-amd64.exe
  2. Rename it to mekong.exe
  3. Move it to a directory in your PATH (e.g. C:\Windows\System32)
  4. Open a terminal and run mekong 3000

Build from source (Go 1.24+)

git clone https://github.com/MuyleangIng/MekongTunnel.git
cd MekongTunnel
make build-client
# binary at: bin/mekong

Or install directly via Go:

go install muyleanging.com/mekongtunnel/cmd/mekong@latest

Upgrading

If you already have mekong installed, just run:

mekong update

The CLI detects your platform, downloads the latest release, and replaces the binary in-place. No need to re-run the curl install script.


Raw SSH (no install needed)

Skip the CLI entirely and use the ssh command you already have.

Basic

ssh -t -R 80:localhost:3000 mekongtunnel.dev
ssh -t -R 80:localhost:3000 -o ServerAliveInterval=60 -o ServerAliveCountMax=3 mekongtunnel.dev

With expiry

ssh -o SetEnv=MEKONG_EXPIRE=48h -t -R 80:localhost:3000 mekongtunnel.dev

Replace 3000 with your local port. The -t flag is required, or the server cannot display your tunnel URL.

If your SSH client supports passing remote arguments cleanly, you can also use:

ssh -t -R 80:localhost:3000 mekongtunnel.dev --expire=1w

Verify the install

mekong --help

You should see the usage information and available flags.