Przejdź do treści
Localtonet Localtonet Panel

Ta strona nie jest jeszcze dostępna w języku: Polski. Wyświetlamy ją po angielsku.

Expose a UDP service

Pomoc z tą stroną
Na tej stronie 7 sekcji
  1. Before you start
  2. Steps
  3. Open the TCP - UDP page
  4. Fill in the form
  5. Start the tunnel and share the endpoint
  6. What is different from TCP
  7. Example: a game server
  8. On the Free plan
  9. Troubleshooting
  10. Related pages

A UDP tunnel forwards UDP traffic from a public host name and port to a local port. Use it for real-time, latency-sensitive services such as game servers and voice servers.

UDP tunnels are created with the same form as TCP tunnels and behave the same way in most respects. This page gives you the steps and the differences. The shared mechanics, such as the server port, the reserved port and the Tunnel IP, are explained on the TCP page.

Before you start #

  • The Localtonet client is installed on the device and connected with an AuthToken. If it is not, follow the Quick start.
  • Your service listens on a UDP port and you know the number.
  • Check which protocol your service really uses. If it needs TCP and UDP on the same port, create a UDP - TCP tunnel instead.

Steps #

  1. Open the TCP - UDP page #

    Open My Tunnels › TCP - UDP and select Create TCP - UDP Tunnel.

  2. Fill in the form #

    FieldWhat to enter
    ProtocolUDP
    Device tokenThe token used by the Localtonet app on your device.
    Server regionChoose a region close to your device for lower latency.
    Local IP address127.0.0.1 when the service runs on the same device as the client.
    Local portThe UDP port your service listens on.
    URL type and DomainRandom subdomain on localto.net works right away. Custom subdomain needs Balance.

    Select Create tunnel.

  3. Start the tunnel and share the endpoint #

    Select the start button in the Actions column. The URL column then shows the endpoint as <SUBDOMAIN>.localto.net:<SERVER_PORT>, and the Protocol Type column shows UDP. Give your players or clients this host and port.

What is different from TCP #

TopicUDP tunnel
Server port and Is Reserved?Same as TCP. The port is assigned at the first start. It stays the same across restarts only when it is reserved, which needs Balance.
Is SslStream?Not offered.
Proxy Protocol?Not offered.
Show SSH CommandNot offered. Starting a tunnel with plain SSH works for HTTP and TCP tunnels only, so a UDP tunnel needs the Localtonet client.
Other settingsThe same as for TCP: Server Port, Legacy Connect?, Tunnel IP, IP Restriction, the limits, the logs, Arguments, Outbound Port and Tunnel Note. See the settings table on the TCP page.

Example: a game server #

Many game servers use UDP. Create a UDP tunnel with the game's port as Local port, start it, and let your friends add the server with the host name and the server port from the URL column. Minecraft Bedrock Edition is an exception: since Bedrock 26.60 it needs TCP and UDP, so it uses a UDP - TCP tunnel. The step-by-step guide is Using Localtonet with Minecraft.

Hosting for more than one evening? Reserve the port so the address your friends saved keeps working. See Reserved port on the TCP page.

On the Free plan #

UDP tunnels count as TCP/UDP tunnels for the Free session limit: they stop after 30 minutes. Select Start to begin another session. The server port is not reserved on the Free plan, so it can change when the tunnel starts again. See Plans and Balance.

Troubleshooting #

Clients cannot reach the server

Check that the tunnel is started and that the Connection column shows ON. Compare the host and port your clients use with the URL column, because an unreserved port changes after a restart. Make sure the service listens on UDP, not TCP, on the local port of the tunnel.

The service needs TCP as well

A UDP tunnel carries UDP only, and the page has no option to change the protocol of an existing tunnel. Create a UDP - TCP tunnel, which carries both protocols on one server port, and delete the UDP tunnel if you no longer need it.

"You need to purchase balance to use this feature."

A custom subdomain, a reserved port and a server port of your choice need Balance.

Pomoc