- Remote access protocols like SSH, VNC, and RDP
- Databases like MySQL, Postgres, MSSQL, and SQLite
- IoT protocols like MQTT
- Gaming servers like Minecraft
TCP endpoints are only available on a free plan after adding a valid payment method to your account.
Quickstart
Cloud endpoints are persistent and live until they are deleted. They are created via the ngrok dashboard or API. Traffic Policy controls how a Cloud Endpoint handles traffic. See the Cloud Endpoints Quickstart for a step-by-step guide on how to create a Cloud Endpoint in the ngrok dashboard. The following example uses the API to create a Cloud Endpoint which returns aHello world! 200 OK response.
Command line
Command line
You can reserve a TCP Address in the ngrok dashboard.
traffic-policy.yml
URLs
ngrok validates URLs differently depending on their binding. Consult the following documentation for details on valid URLs for TCP endpoints: There is no standard scheme for TCP URLs, so ngrok renders them astcp://.
Static URLs
To give a public TCP endpoint a static URL, first create a TCP Address. When you create a TCP address, ngrok assigns you a random hostname and port, for example,1.tcp.ngrok.io:12345.
You only need a TCP address to make a public TCP endpoint have a static URL.
You don’t need one for TCP endpoints on other bindings, like internal or kubernetes.
After you create a TCP Address, specify the address (for example, 1.tcp.eu.ngrok.io:12345) in the URL when you create the endpoint.
See the quickstart to learn how.
Custom domains
ngrok assigns public TCP endpoints a random ngrok-controlled hostname and a random port. You can’t choose the hostname or the port. However, you can simulate a customized hostname by creating a CNAME record to the hostname of your assigned TCP address. If you do so, be aware that all ports on that hostname, even those provisioned to other accounts, are then available on your domain. For example, if your TCP address is5.tcp.ngrok.io:12345, you can create the following CNAME record:
Traffic Policy
Attach Traffic Policy to endpoints to route, authenticate, and transform the traffic through the endpoint.Authentication
When you create public TCP endpoints, you often want to secure them with authentication. You can secure your TCP endpoints with the following Traffic Policy actions. There is a limited set of actions available to authenticate TCP traffic because the TCP protocol is low-level.- IP Restriction
- [Mutual TLS](/gateway/traffic-policy/actions/terminate-tls/