Basic Usage

Master the essential InstaTunnel commands for everyday development. These cover 90% of use cases.

๐ŸŽฏ Core Commands

Basic Tunneling

# Auto-detect running application (recommended)
$ instatunnel
๐Ÿ” Auto-detected service on port 3000
โœ… Tunnel created: https://abc123.instatunnel.my
# Use short alias (even faster)
$ it
๐Ÿ” Auto-detected service on port 3000
โœ… Tunnel created: https://def456.instatunnel.my
# Specify port manually if needed
$ instatunnel 3000
โœ… Tunnel created: https://ghi789.instatunnel.my

Auto-detection is the easiest way! Just run instatunnel or it and it will find your running app automatically.

Custom Subdomains

# Use a custom subdomain
$ instatunnel 3000 --subdomain myapp
โœ… Tunnel created: https://myapp.instatunnel.my
# Short form
$ instatunnel 3000 -s myapp
โœ… Tunnel created: https://myapp.instatunnel.my

Perfect for consistent URLs during development or when sharing with team members.

Multiple Tunnels

# Terminal 1: Frontend
$ instatunnel 3000 --subdomain frontend
โœ… Tunnel created: https://frontend.instatunnel.my
# Terminal 2: API
$ instatunnel 8000 --subdomain api
โœ… Tunnel created: https://api.instatunnel.my
# Terminal 3: Database admin
$ instatunnel 5432 --subdomain db-admin
โœ… Tunnel created: https://db-admin.instatunnel.my

Run multiple tunnels simultaneously for complex applications with frontend, backend, and additional services.

๐Ÿ“‹ Tunnel Management

List Active Tunnels

# Show all running tunnels
$ instatunnel --list
๐Ÿš‡ Active Tunnels (2)
๐ŸŸข https://frontend.instatunnel.my โ†’ localhost:3000
Subdomain: frontend
Status: active
๐ŸŸข https://api.instatunnel.my โ†’ localhost:8000
Subdomain: api
Status: active

Stop Tunnels

# Stop specific tunnel by name or subdomain
$ instatunnel --kill frontend
๐Ÿ›‘ Tunnel 'frontend' has been stopped
# Use Ctrl+C in tunnel terminal to stop running tunnel
# Gracefully stops the tunnel
# Note: --kill requires API key for authenticated tunnels

๐Ÿ“Š Information & Analytics

Live Request Logs

# Login once with your API key
$ instatunnel auth login -e you@example.com
$ instatunnel auth set-key "it_your_api_key"
# View live request logs for active tunnels
$ instatunnel 3000
โœ… Tunnel created: https://abc123.instatunnel.my
๐Ÿ“Š Live requests will appear here automatically...
# Access dedicated logs viewer
$ instatunnel --logs
Live request log polling started (every 5s)
[12:31:09] myapp.instatunnel.my GET /health -> 200 (9ms)
Press Ctrl+C to stop

Plan note: detailed request logs in --logs are available on Pro and Business plans.

Usage Statistics

# View real account usage (last 30 days)
$ instatunnel --stats
InstaTunnel Usage Statistics
Period: last 30 days
Active tunnels: 3
Total requests: 1247
Bandwidth: 45.20 MB

Requires a saved API key. If not logged in, the CLI shows the exact login command.

Region Flag

# Current deployment region
$ instatunnel 3000 --region us
โœ… Tunnel created
# Unsupported region values fail fast
$ instatunnel 3000 --region eu
Error: unsupported --region value "eu"

Current production deployment supports only us.

QR Code for Mobile Testing

# Generate QR code for mobile testing
$ instatunnel 3000 --qr
โœ… Tunnel created: https://abc123.instatunnel.my
๐Ÿ“ฑ QR Code for Mobile Testing:
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆ โ–ˆโ–ˆ โ”‚
โ”‚ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
๐Ÿ“ฒ Scan with your phone camera

Perfect for testing mobile responsive design and touch interactions on real devices.

๐Ÿ”’ Security Features

Password Protection

# Password protect your tunnel
$ instatunnel 3000 --password secret123
๐Ÿ”’ Password protection enabled
โœ… Tunnel created: https://abc123.instatunnel.my
๐Ÿ”’ Password protected (visitors need password to access)

Protect your tunnel with a password. Visitors must enter the password to access your app.

Basic Authentication

# Enable HTTP basic authentication
$ instatunnel 3000 --auth username:password
๐Ÿ” Basic authentication enabled
โœ… Tunnel created: https://abc123.instatunnel.my
๐Ÿ” Basic auth enabled (username/password required)

Use HTTP basic authentication for more robust security. Perfect for staging environments.

๐Ÿ“ฑ Sharing & Collaboration

Social Sharing Templates

# Generate shareable text for social media
$ instatunnel --share
๐Ÿ“ฑ InstaTunnel Share Text Generator
๐Ÿ’ก Demo Template:
๐Ÿš€ Check out my local app live: [TUNNEL_URL]
Built with InstaTunnel - the ngrok alternative!
# Replace [TUNNEL_URL] with your actual tunnel URL

Get ready-made social media templates for sharing your tunnels professionally.

๐Ÿ›  Common Patterns

Frontend Development

# React (auto-detects port 3000)
$ instatunnel --react
# Next.js (auto-detects port 3000)
$ instatunnel --next
# Vue/Vite
$ instatunnel 5173

API Development

# Laravel (auto-detects port 8000)
$ instatunnel --laravel
# Express/Node.js
$ instatunnel 8000
# Custom port
$ instatunnel 4000

Full-Stack Development

$ instatunnel 3000 -s frontend
$ instatunnel 8000 -s api
$ instatunnel 5432 -s database

Quick Sharing & Mobile

# Auto-detect and share instantly
$ it
# With QR code for mobile (auto-detect)
$ instatunnel --qr
# With memorable name (auto-detect)
$ instatunnel -s demo

OAuth Callback Testing

# Keep a fixed redirect URL while developing OAuth locally
$ instatunnel 3000 --subdomain oauth-dev
# Set this in provider console (Google/GitHub/etc.)
https://oauth-dev.instatunnel.my/auth/callback
# Inspect callback requests during login flow
$ instatunnel --logs

Use one stable subdomain per app environment so redirect URIs stay valid and you avoid provider reconfiguration.

Team QA / Demo Links

# Protected link for reviewers and clients
$ instatunnel 3000 --subdomain acme-qa --auth qa:review2026 --qr
# Generate share-ready text templates
$ instatunnel --share

Prefer --auth for team demos, rotate credentials per demo cycle, and disable tunnel when review is complete.

๐Ÿงพ Flag Quick Reference

--subdomain, -s Set tunnel subdomain
--domain, -d Use custom domain (Pro/Business)
--region, -r Region (currently only us)
--password Password protect tunnel
--auth Basic auth username:password
--mcp MCP tunnel mode (Pro/Business)
--transport MCP transport (v1 default, v2 streaming)
--qr Print QR code
--list List active tunnels (auth)
--kill Stop tunnel by subdomain (auth)
--logs Poll live request logs (Pro/Business)
--stats Show real 30-day usage summary (auth)
--share Print social sharing templates
--react/--next/--laravel Framework shortcuts

๐Ÿ’ก Pro Tip: Just run it for instant auto-detection! For consistent URLs, use it -s my-project - your team can bookmark the same URL!

โœ… Validation: Commands shown above map to the current CLI behavior in this release. Plan-gated commands require the right account tier.

๐Ÿš€ New features: QR codes, password protection, basic auth, framework detection, and social sharing templates are all working!

Need a quick path?

Plan o mite, hitsuyo na toki ni guided start o tsukatte kudasai.

For MCP endpoints on Pro/Business, use instatunnel 8787 --mcp.

Docs | InstaTunnel