MULTI-TUNNEL ENGINE • RUNS IN BACKGROUND • ZERO CONFIG

Expose anything,
instantly.

PortX delivers fast, unbreakable tunnels from localhost to the public internet. Run multiple simultaneous tunnels concurrently, detach workers to run quietly in the background, and rely on 90-second failover recovery.

brew install aushaif/portx/portx
portx-session — zsh — 80x24
SUPPORTED PROTOCOLS & RUNTIME CAPABILITIES
HTTP & HTTPS (Auto SSL)
TCP Static Ports
UDP Low Latency
Multiple Tunnels Concurrently
Runs in Background (--bg)

One tool. Every port. Zero babysitting.

Run multiple tunnels simultaneously, detach background daemons that free your terminal, and survive router reboots without dropped connections.

HTTP / HTTPS GATEWAY

Instant Webhooks & Clean HTTPS URLs

Expose local web applications with zero setup. Enjoy automatic wildcard SSL certificates, custom subdomains, and instant routing for third-party webhooks from Stripe, GitHub, and Shopify.

$ portx http 8080 -s preview
TCP MULTIPLEXING

Minecraft Java, SSH & Database Gateways

Reserve exact public TCP ports for game servers, PostgreSQL, MySQL, and SSH access. Friends and colleagues connect directly to your host without entering dynamic random ports.

$ portx tcp 25565 mc --p 25565
LOW-LATENCY UDP

Minecraft Bedrock & Real-Time Audio/Video

High-throughput UDP packet multiplexing allows hosting Minecraft Bedrock edition, custom UDP game lobbies, and VoIP streams with zero jitter buffer buildup and direct socket preservation.

$ portx udp 19132 bedrock --p 19132
SIMULTANEOUS MULTI-TUNNEL

Run Multiple Tunnels Concurrently

Run your React frontend on 3000, Python backend API on 8000, and PostgreSQL on 5432 all simultaneously. Each tunnel runs in an isolated process with dedicated routing and zero port collisions.

$ portx list
BACKGROUND DAEMONS (--bg)

Runs Quietly in the Background

Never keep terminal tabs open again. Detach tunnels to run silently in the background. Close your terminal, check status with portx list, and stop anytime with portx stop.

$ portx http 3000 --bg
BOOT RECOVERY WATCHDOG

Survives Reboots & Network Blips

With sudo portx watchdog install, macOS LaunchDaemon or Linux systemd automatically restores every tunnel upon system reboot before you even sign in.

$ sudo portx watchdog install

Built to outlast your router.

Home routers silently kill idle NAT sessions — most tunnels drop within hours. PortX fights back with a 6-layer stack of keepalives, heartbeats, and instant auto-recovery.

LAYER 1 INTERVAL: 30s

TCP Mux Keepalive

Sends bidirectional keepalive frames at the transport layer every 30 seconds. Keeps domestic router NAT state tables alive indefinitely.

LAYER 2 INTERVAL: 30s

Active Heartbeat Probes

Pings the cloud relay every 30 seconds to verify bidirectional throughput. Detects cable unplugs and ISP route changes immediately.

LAYER 3 TIMEOUT: 90s

Dead-Connection Reaper

If no heartbeat response arrives within 90 seconds, the client self-terminates the stalled socket rather than hanging in a dead zombie state.

LAYER 4 REAL-TIME

Live Log Stream Watchdog

The worker daemon inspects raw client stdout/stderr in real-time, catching socket errors, proxy collisions, or handshake timeouts instantly.

LAYER 5 BACKOFF: 2s → 120s

Exponential Auto-Reconnect

Automatically recovers across Wi-Fi disconnects or VPS server updates. Uses the reregister API to reclaim the exact same URL and port.

LAYER 6 < 200ms DURATION

Zero-Downtime Hot Reloads

Modify local target ports or config flags via portx edit and portx reload without dropping healthy tunnels or losing endpoints.

Full control from your terminal.

Search and filter every PortX command — tunnels, lifecycle management, system services, and auth.

portx http [target]
Create an HTTP/HTTPS public tunnel with automatic SSL and optional custom subdomain.
portx http 8080 -s demo
portx tcp [port]
Forward TCP services (Minecraft Java, SSH, databases) to a dedicated public port.
portx tcp 25565 --p 25565
portx udp [port]
Low-latency UDP packet tunnel for Minecraft Bedrock, VoIP, and custom game sockets.
portx udp 19132 --p 19132
portx list
Display all tunnels, local targets, public URLs, and real-time status indicators.
portx list
portx stop | start
Pause or resume tunnels without releasing reserved public URLs or static ports.
portx stop my-tunnel
portx reload [name]
Zero-downtime hot reload: reloads config dynamically without dropping live connection.
portx reload my-app
portx edit [name]
Interactive in-terminal editor to reconfigure tunnel parameters safely.
portx edit minecraft
portx remove [name]
Permanently delete a tunnel and release its remote subdomain or port back to pool.
portx remove my-tunnel
portx watchdog install
Install OS system service (LaunchDaemon on macOS, systemd on Linux) for boot auto-start.
sudo portx watchdog install
portx status
Inspect overall system health, API server latency, active daemons, and watchdog state.
portx status
portx api [token]
Configure or display your authentication token stored securely in ~/.portx/config.toml.
portx api <token>

Got questions? We've got answers.

How does PortX keep tunnels alive for days without dropping?
Traditional tools rely on idle TCP sessions that home routers silently wipe from their NAT translation tables after minutes of inactivity. PortX sends bidirectional TCP-level keepalive frames every 30 seconds and probes bidirectional heartbeats. If a packet is lost, it detects it within 90 seconds and automatically reconnects using the reregister API.
Do I need to keep a terminal window open?
No. PortX automatically detaches all tunnels into independent background daemons with kernel-level file locks. You can close your terminal, reboot your machine with the watchdog enabled, and manage everything cleanly via the CLI.
Can I run multiple tunnels simultaneously?
Yes. You can run dozens of HTTP, TCP, and UDP tunnels concurrently. Each tunnel runs in its own isolated process with dedicated logs in ~/.portx/logs/.
Is PortX free and open source?
Yes! PortX is 100% free and open-source under the MIT License. The code is available publicly on GitHub and requires zero external Python dependencies.