Skip to content

Configuration

All available options for the Trapdoor client.

Usage

bash
trapdoor <port> [name]
ArgumentDescriptionRequired
portLocal port to exposeYes
nameCustom subdomain nameNo (random if not specified)

Examples

Basic Usage

bash
# Expose port 3000 with random subdomain
trapdoor 3000

Custom Subdomain

bash
# Get https://myapp.trapdoor.sh
trapdoor 3000 myapp

Multiple Tunnels

bash
# Terminal 1
trapdoor 3000 frontend

# Terminal 2
trapdoor 5000 api

Auto Reconnect

Trapdoor automatically reconnects if the connection drops. The reconnect strategy:

  1. Instant first retry
  2. Exponential backoff: 0.5s, 1s, 2s, 4s...
  3. Max 30 seconds between retries
  4. Up to 10 retry attempts

This ensures your tunnel stays alive even with network issues.