Deploy public-tunnel

Make public TCP port use Tailscale and Socat

Deploy public-tunnel

thuonghai2711/publictunnel

thuonghai2711/publictunnel

Just deployed

Deploy and Host public-tunnel on Railway

public-tunnel is a simple TCP tunneling service that allows you to expose a private TCP service to the public internet without opening inbound ports on the source machine. It works by forwarding traffic through a cloud-hosted tunnel endpoint.

About Hosting public-tunnel

Hosting public-tunnel on Railway allows you to create a publicly accessible TCP endpoint that forwards traffic to a private target service. Railway provides the public TCP proxy, while public-tunnel handles the connection to the target. This setup is useful for accessing services behind NAT, firewalls, or CGNAT without modifying network infrastructure.

Common Use Cases

  • Exposing Windows RDP (TCP 3389) from a private network
  • Providing public access to SSH servers behind NAT
  • Forwarding traffic to internal development or testing services

Dependencies for public-tunnel Hosting

  • Docker-compatible runtime
  • Tailscale account and auth key

Deployment Dependencies

Implementation Details

public-tunnel runs as a Docker container that listens on TCP port 2711 and forwards incoming connections to a target address specified by environment variables.

Required environment variables:

TOKEN=tskey-auth-xxxxxxxx TARGET=100.x.x.x:PORT

Why Deploy public-tunnel on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying public-tunnel on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

thuonghai2711/publictunnel

thuonghai2711/publictunnel

More templates in this category

View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

View Template
(v1) Simple Medusa Backend
Deploy an ecommerce backend and admin using Medusa

View Template
peppermint
Docker-compose port for peppermint.sh