Guides
Game Server Hosting
Host a Minecraft Java or Terraria server from your own PC and give friends one address to join. No port forwarding and no rented server.
Summary
How it works#
The agent on your PC connects outward to Localport. Friends connect to the tunnel's public address, and Localport carries each connection to the port your game server listens on. Your router accepts no inbound connection, so there is no port to forward and no public IP address to find.
You need a Localport account, the Localport agent, and a game server running on your machine.
Minecraft Java Edition#
1. Start your Minecraft server. It listens on port 25565 by default.
2. Create a TCP tunnel in the dashboard. TCP Tunnels walks through the panel.
3. Run the agent:
localport tcp 25565 --token tok_YOUR_TOKEN --region eu
4. The agent prints the public address:
minecraft-world.eu.localport.dev:47266
5. Send that address to your friends. In the game they choose Multiplayer, then Add Server, and paste it.
Terraria#
A Terraria server listens on port 7777 by default:
localport tcp 7777 --token tok_YOUR_TOKEN --region eu
Friends choose Multiplayer, then Join via IP, and enter the host and the port from the tunnel's address.
Which games work#
A TCP tunnel carries TCP. A game whose server speaks TCP works, and a game whose server speaks UDP does not.
| Game | Protocol | Works |
|---|---|---|
| Minecraft Java Edition | TCP, port 25565 | Yes |
| Terraria | TCP, port 7777 | Yes |
| Minecraft Bedrock Edition | UDP | No |
| Valheim | UDP | No |
| Factorio | UDP | No |
For any other game, look up the protocol its dedicated server uses before you set up a tunnel.
Keep the same address#
The port is assigned when the tunnel first connects and can change on a later connection. Open the tunnel's settings and select Reserve in the Port field to hold the number. Set a subdomain as well, and the full address never changes.
Friends save the server once and it works for every session.
Choose a region near your players#
The region is part of the address and decides where connections enter. Pick the region closest to most of your players when you create the tunnel. EU, US and Asia Pacific are available.
Frequently asked questions#
How do I host a Minecraft server without port forwarding?
Run localport tcp 25565 --token tok_YOUR_TOKEN --region eu on the machine running the server and share the host and port the agent prints. The connection goes outward from your machine, so the router needs no configuration.
Does Minecraft Bedrock Edition work?
No. Bedrock uses UDP, and a tunnel carries TCP. Minecraft Java Edition uses TCP and works.
Does the server address change every time?
Not if you reserve the port. Select Reserve in the Port field of the tunnel's settings and the address is the same after every restart.
Does it work on university or mobile networks?
Yes. The agent makes an outbound connection, so it works behind carrier-grade NAT and on networks where you cannot change the router.
Does my PC have to stay on?
Yes. The server runs on your PC, and the tunnel is up while the agent is running. Friends cannot join after you close the agent or shut the machine down.
Can players see my home IP address?
No. Players connect to the tunnel's address. Your home IP address is not in it.
What to read next#
- TCP Tunnels. Create the tunnel, reserve its port and set its subdomain.
- IP Allowlists. Let only the addresses you name connect.
- Installation. Install the agent and run it as a background service.