Expose multiple services on a single hostname with HTTP and TCP on different ports
Multi-port tunneling allows you to expose multiple services (HTTP, TCP, databases, APIs) under a single tunnel hostname. This is perfect for full-stack applications where you need to expose both your web frontend and backend services like databases.
# Start your services locally
npm run dev # HTTP server on port 3000
docker run -p 5432:5432 postgres # PostgreSQL on port 5432
# Create multi-port tunnel
simpletunnel -port 3000 -tcp 5432
✓ Tunnel established!
Tunnel ID: nova-4823
HTTP Service:
Local: localhost:3000
Public: https://nova-4823.simpletunnel.com
TCP Service (PostgreSQL):
Local: localhost:5432
Public: nova-4823.simpletunnel.com:15432
📝 Logs: /Users/you/.simpletunnel/logs/nova-4823.log
You can expose multiple TCP services by specifying the -tcp flag multiple times:
# Start your services
npm run dev # Port 3000
docker run -p 5432:5432 postgres
docker run -p 6379:6379 redis
# Create tunnel with multiple TCP ports
simpletunnel -port 3000 -tcp 5432 -tcp 6379
✓ Tunnel established!
Tunnel ID: aurora-7621
HTTP Service:
Local: localhost:3000
Public: https://aurora-7621.simpletunnel.com
TCP Service (PostgreSQL):
Local: localhost:5432
Public: aurora-7621.simpletunnel.com:15432
TCP Service (Redis):
Local: localhost:6379
Public: aurora-7621.simpletunnel.com:16379
# 1. Start all services locally
npm run dev # Next.js on 3000
docker compose up postgres redis # DB on 5432, Redis on 6379
# 2. Create multi-port tunnel
simpletunnel -port 3000 -tcp 5432 -tcp 6379
# 3. Update your .env to use public endpoints
DATABASE_URL="postgresql://user:pass@aurora-7621.simpletunnel.com:15432/mydb"
REDIS_URL="redis://aurora-7621.simpletunnel.com:16379"
# 4. Share with your team
Frontend: https://aurora-7621.simpletunnel.com
Database: aurora-7621.simpletunnel.com:15432
Cache: aurora-7621.simpletunnel.com:16379
# Using psql
psql -h nova-4823.simpletunnel.com -p 15432 -U myuser -d mydb
# Connection string
postgresql://myuser:mypass@nova-4823.simpletunnel.com:15432/mydb
# In your app (Node.js)
const { Pool } = require('pg');
const pool = new Pool({
host: 'nova-4823.simpletunnel.com',
port: 15432,
user: 'myuser',
password: 'mypass',
database: 'mydb'
});
# Using mysql client
mysql -h nova-4823.simpletunnel.com -P 13306 -u root -p
# Connection string
mysql://root:password@nova-4823.simpletunnel.com:13306/mydb
# Using redis-cli
redis-cli -h nova-4823.simpletunnel.com -p 16379
# Connection string
redis://nova-4823.simpletunnel.com:16379
# Connection string
mongodb://nova-4823.simpletunnel.com:27017/mydb
Share your entire application stack (frontend + backend + database) with one URL.
Let remote developers connect to your local database for debugging without VPN.
Expose multiple microservices on different TCP ports for integration testing.
Show clients a complete working application with real data and database connections.
simpletunnel -port 3000 -tcp 5432 -password mySecret123