Skip to main content

How Do I Handle TCP Traffic?

TCP endpoints enable you to deliver any network service with a TCP-based protocol. They are commonly used to create connectivity for:

  • Remote access protocols like SSH, VNC and RDP
  • Databases like MySQL, Postgres, MSSQL and SQLite
  • IoT protocols like MQTT
  • Gaming servers like Minecraft

If you are accepting TLS traffic, consider using a TLS Endpoint.

Free Plan Usage

TCP endpoints are only available on a free plan after adding a valid payment method to your account.

Quickstart

Agent Endpoints are the easiest way to get started with ngrok. An agent endpoint is started by a Secure Tunnels agent. The endpoint lives for the lifetime of the process and forwards traffic to a port or URL of your choosing.

This example creates a TCP endpoint on a randomly-assigned URL - e.g. tcp://1.tcp.ngrok.io:12345 and forwards its traffic to a local port.

Loading…

Learn more

Errors

Learn how ngrok handles errors for TCP endpoints in the Errors documentation.

API

TCP Endpoints can be created programatically. Consult the documentation on Endpoint APIs.

Limits & pricing

TCP endpoints are available on all plans. To access them on the free plan, add a payment method to your ngrok account. Consult the pricing documentation for general billing details.

For TCP limits, see the endpoint Limits documentation.

tip

See TCP Addresses pricing for details on pricing for fixed TCP Addresses.