TCP Tunnels
Raw TCP forwarding for anything that isn't HTTP.
How it works
HTTP tunnels speak HTTP, but plenty of services don't. TCP tunnels pass raw bytes between a public host:port and your local port — so any TCP-based protocol works: game servers, SSH, databases, custom sockets, you name it.
Start a TCP tunnel
prevbox serve tcp 25565
# → your-tunnel.previewbox.dev:25565 → localhost:25565The default TCP port is 25565, but you can pass any port you need.
Example: Minecraft
Run a Minecraft server locally, then share it with friends over the internet:
Share a Minecraft server
# 1. Run your server (default port 25565)
java -jar server.jar nogui
# 2. In another terminal, open a TCP tunnel
prevbox serve tcp 25565
# 3. Share the URL with your friends — they connect with:
# your-tunnel.previewbox.dev:25565Your friends add the tunnel host and port as a server in Minecraft — no port forwarding, no public IP, no router configuration needed.
Other things you can tunnel
- SSH — expose an SSH daemon to a colleague without VPN setup.
- Databases — reach a local Postgres, MySQL or Redis from a remote machine.
- Custom protocols — anything that speaks raw TCP.
For web servers and APIs, use HTTP tunnels instead — you'll get HTTPS, request logs and subdomain options for free.